[
https://issues.apache.org/jira/browse/SOLR-11662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16261548#comment-16261548
]
ASF GitHub Bot commented on SOLR-11662:
---------------------------------------
GitHub user softwaredoug opened a pull request:
https://github.com/apache/lucene-solr/pull/275
SOLR-11662: Configurable query when terms overlap
Modifies QueryBuilder and Solr Field Type to allow configurable overlap
scoring asides from SynonymQuery
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/o19s/lucene-solr
configurable-synonym-query-behavior
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucene-solr/pull/275.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #275
----
commit d83b1300a8b469fa19e5fd9ae8264f6fa448bb18
Author: Doug Turnbull <[email protected]>
Date: 2017-11-21T19:02:09Z
Makes QueryBuilder synonym matching configurable
commit f279435b46f81232181a658be5e856bdbca9924f
Author: Doug Turnbull <[email protected]>
Date: 2017-11-21T20:03:54Z
plumb through the field type setting
commit 1e9e41c4cccff10effd4a29da30c378ee21dac3d
Author: Doug Turnbull <[email protected]>
Date: 2017-11-21T20:17:56Z
Fix enum style
commit 8eb875fcccf533d3799b15d266c724c868e13d34
Author: Doug Turnbull <[email protected]>
Date: 2017-11-21T21:47:04Z
Renaming to scoreOverlaps
----
> Make overlapping query term scoring configurable per field type
> ---------------------------------------------------------------
>
> Key: SOLR-11662
> URL: https://issues.apache.org/jira/browse/SOLR-11662
> Project: Solr
> Issue Type: Improvement
> Security Level: Public(Default Security Level. Issues are Public)
> Reporter: Doug Turnbull
> Fix For: 7.2, master (8.0)
>
>
> This patch customizes the query-time behavior when query terms overlap
> positions. Right now the only option is SynonymQuery. This is a fantastic
> default & improvement on past versions. However, there are use cases where
> terms overlap positions but don't carry exact synonymy relationships. Often
> synonyms are actually used to model hypernym/hyponym relationships using
> synonyms (or other analyzers). So the individual term scores matter, with
> terms with higher specificity (hyponym) scoring higher than terms with lower
> specificity (hypernym).
> This patch adds the fieldType setting scoreOverlaps, as in:
> {code:java}
> <fieldType name="text_general" scoreOverlaps="pick_best"
> class="solr.TextField" positionIncrementGap="100" multiValued="true">
> {code}
> Valid values for scoreOverlaps are:
> *as_one_term*
> Default, most synonym use cases. Uses SynonymQuery
> Treats all terms as if they're exactly equivalent, with document frequency
> from underlying terms blended
> *pick_best*
> For a given document, score using the best scoring synonym (ie dismax over
> generated terms).
> Useful when synonyms not exactly equilevant. Instead they are used to model
> hypernym/hyponym relationships. Such as expanding to synonyms of where terms
> scores will reflect that quality
> IE this query time expansion
> tabby => tabby, cat, animal
> Searching "text", generates the dismax (text:tabby | text:cat | text:animal)
> *as_distinct_terms*
> (The pre 6.0 behavior.)
> Compromise between pick_best and as_oneSterm
> Appropriate when synonyms reflect a hypernym/hyponym relationship, but lets
> scores stack, so documents with more tabby, cat, or animal the better w/ a
> bias towards the term with highest specificity
> Terms are turned into a boolean OR query, with documen frequencies not blended
> IE this query time expansion
> tabby => tabby, cat, animal
> Searching "text", generates the dismax (text:tabby text:cat text:animal)
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]