I want to increase a significancy for some terms in the query. E.g.
increase term 'iphone' in phrase 'I like iphone'.
The recipe i found so far is 'query_string':
{
"query": {
"query_string": {
"query": "I like iphone^5.0"
}
}
}
The first question is do I lose the 'analysis' for this query. I mean
if I set up stemmer will it work? Or for that kind of query the string
will be processed 'as is'.
And the second - Are there any better ways to do it? Mb I should use
boolean query with term boosting instead?
Thanks!
ps posted to nabble previously, but seems it ignored the post.
I want to increase a significancy for some terms in the query. E.g.
increase term 'iphone' in phrase 'I like iphone'.
The recipe i found so far is 'query_string':
{
"query": {
"query_string": {
"query": "I like iphone^5.0"
}
}
}
The first question is do I lose the 'analysis' for this query. I mean
if I set up stemmer will it work? Or for that kind of query the string
will be processed 'as is'.
The analysis will still work.
And the second - Are there any better ways to do it? Mb I should use
boolean query with term boosting instead?
I would say yes, there are better ways. Trying to express your whole
query in the lucene query string syntax becomes quite messy.
The query string syntax gets converted into multiple queries combined
with bool and dismax queries anyway, so you can use the query DSL to
combine queries with different boosts yourself
I want to increase a significancy for some terms in the query. E.g.
increase term 'iphone' in phrase 'I like iphone'.
The recipe i found so far is 'query_string':
{
"query": {
"query_string": {
"query": "I like iphone^5.0"
}
}
}
The first question is do I lose the 'analysis' for this query. I mean
if I set up stemmer will it work? Or for that kind of query the string
will be processed 'as is'.
The analysis will still work.
And the second - Are there any better ways to do it? Mb I should use
boolean query with term boosting instead?
I would say yes, there are better ways. Trying to express your whole
query in the lucene query string syntax becomes quite messy.
The query string syntax gets converted into multiple queries combined
with bool and dismax queries anyway, so you can use the query DSL to
combine queries with different boosts yourself
Most of the queries map one to one to the Lucene Query. text is a bit
different since it analyzes the text and then constructs a boolean / prefix
/ phrase prefix query out of it.
I want to increase a significancy for some terms in the query. E.g.
increase term 'iphone' in phrase 'I like iphone'.
The recipe i found so far is 'query_string':
{
"query": {
"query_string": {
"query": "I like iphone^5.0"
}
}
}
The first question is do I lose the 'analysis' for this query. I mean
if I set up stemmer will it work? Or for that kind of query the string
will be processed 'as is'.
The analysis will still work.
And the second - Are there any better ways to do it? Mb I should use
boolean query with term boosting instead?
I would say yes, there are better ways. Trying to express your whole
query in the lucene query string syntax becomes quite messy.
The query string syntax gets converted into multiple queries combined
with bool and dismax queries anyway, so you can use the query DSL to
combine queries with different boosts yourself
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.