Suppose I would like to search index with 2 term query.
I can do it with PhraseQuery(term1, term2, slop = 2) or with SpanNearQuery(term1, term2, slop=2, ordered=false)
.
What is the difference in lucene scoring for these configurations?
相关问题
- JCR-SQL - contains function doesn't escape spe
- Solr Deduplication (dedupe) giving all zeros in si
- Solr (Sunspot), max results more than 30?
- Match lucene entire field exact value
- How to rank documents using tfidf similairty in lu
相关文章
- Solr - _version_ field must exist in schema and be
- SolrNet - Score always 0
- How can use the /export request handler via SolrJ?
- request counting for documents in apache solr
- How to search records between two coordinates usin
- Boost result by specified search term on top
- CakePHP with Lucene
- Faceted searching and categories in MySQL and Solr
To the best of my understanding, a phrase query with slop will tokenize the phrase, then apply the slop distance between each token, whereas in a span query a phrase will be retained as a unit.
So if you have a phrase query for
"cat dog bird"
with slop3
, it'd matchcat horse lizard dog bird
.But a span query for
"cat dog" bird
with slop3
would not matchcat horse lizard dog bird
becausecat
anddog
are not adjacent. It would, however, match:cat dog horse lizard bird
.