Comments (8)
Yes it is supported.
Look at ElasticsearchQueryBuilder there are options to specify the field that are not analyzed (that is are of type keywords).
Those parameters can be deduced from your mapping using SchemaAnalyzer
There is a short demonstration in Quick Start
from luqum.
Thanks for your reply!
However I can't get it to work. With the following (partially) mapping for a single field:
"attributes":{
"type":"nested",
"properties":{
"first_name":{
"type":"text",
"fields":{
"raw":{
"type":"keyword"
}
}
}
}
}
As you can see I'm using a text field which is also a keyword. And fail in getting it working with the following search query: attributes.first_name.raw:<search_query>
from luqum.
Hum I don't think the schema analyzer support "fields" right now, nor the ElasticsearchQueryBuilder
This could be a good addition of course. I think it's like having an object_field, but relaxing a bit to enable calling it directly (and of course this as to be separate to be more understandable).
I may look into this, but I can't promise to have it quickly. If you are interested in making a PR it is welcome. I may guide you if you have questions after a first look at the code.
from luqum.
@sefaYavuz, if you use None for object_fields parameter of ElasticsearchQueryBuilder it should work !
from luqum.
@sefaYavuz I just pushed a commit fixing this problem.
You now have a sub_fields parameter on ElasticSearchQueryBuilder.
Could you test if it's ok on your side. If so, I would make a release.
from luqum.
@alexgarel Sorry was busy with other stuff in the meanwhile. I will test it today and will get back to you.
from luqum.
@alexgarel Works as expected! When will you be able to make it into a release?
from luqum.
@sefaYavuz released : https://pypi.org/project/luqum/0.7.5/
from luqum.
Related Issues (20)
- match doesn't return results if default_field is '*' HOT 2
- Parser fails with 'TypeError' on invalid query "~]" HOT 4
- Parser fails with 'TypeError' on invalid query "a^" HOT 2
- Parsing error in multithreading HOT 8
- Allow to override `E` elements HOT 2
- Visitor example HOT 2
- Keyword fields containing wildcards cannot be searched for exactly
- Parse fails on word commas (eg "hi , bye") HOT 4
- Publish a new release of luqum HOT 2
- Parser fails at single quote character (eg "hi 'bye'")
- Non-decimal boost throws TypeError instead of ParseError (eg "hello^foo")
- Is there any chance to support ComplexPhraseQuery? HOT 2
- "Field expression is not valid" for Range in LuceneCheck HOT 1
- Unknown item type Phrase during LuceneCheck HOT 1
- Unknown item type Phrase in LuceneCheck
- ISO 8601 date with timezone fails to parse without doublequotes HOT 1
- Parser fails at double quote character HOT 3
- Unable specify negative values in Range queries
- Set analyze_wildcard and allow_leading_wildcard to false globally
- Should allow subclass ENested
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luqum.