[
https://issues.apache.org/jira/browse/SOLR-7963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14744965#comment-14744965
]
Arcadius Ahouansou commented on SOLR-7963:
------------------------------------------
Hello [~janhoy]
Thank you very much for your comment at
https://issues.apache.org/jira/browse/SOLR-7888#comment-14743511
{quote}
It is kind of a hack to force Lucene's AnalyzingSuggester to use same contexts
field name as the source schema field name we pull data from
{quote}
[~janhoy], I would suggest you take a step back and think a bit about this.
Currently, we are hard-coding the field to use in the code while we have the
solr schema facility available.
According to [~mikemccand] blog at
http://blog.mikemccandless.com/2013/06/a-new-lucene-suggester-based-on-infix.html
, {quote}Unlike the existing suggesters, this new suggester does not use a
specialized data-structure such as FSTs. Instead, it's an "ordinary" Lucene
index under-the-hood...{quote}
Basically, the analyzing suggester index could have the very same treatment
that we apply to normal Solr index... that was the main motivation to move to
using the existing solr schema instead of hard coding the field.
I would suggest you think a bit more about this.
{quote}
If the source fieldType in schema.xml is e.g. text, then that Analyser is used
for query, with lowercasing etc. Problem is that the contexts field for the
Suggester is always indexed as String, meaning that a source string "ABC" will
not match a query "ABC" since it will be lowercased and match only "abc"
{quote}
That is a bug in the implementation. I should be using the index-time analyzer
defined in the schema instead.
This can be easily fixed.
And using the analyser defined in the schema should not cause any issue with
using the solr collection for other search purposes as copyField could be used
if one need to separate the field used for searching from the one used for
suggestion.
Thank you very much [~janhoy]
> Suggester context filter query to accept local params query
> -----------------------------------------------------------
>
> Key: SOLR-7963
> URL: https://issues.apache.org/jira/browse/SOLR-7963
> Project: Solr
> Issue Type: Improvement
> Components: Suggester
> Affects Versions: 5.4
> Reporter: Arcadius Ahouansou
> Priority: Minor
> Labels: suggester
>
> SOLR-7888 has introduced a new parameter for filtering suggester queries
> {code}suggest.cfq=ctx1 OR ctx2{code}
> The implementation use the Solr {{StandardQueryParser}} for parsing the cfq
> param.
> This card is to allow to pass in local param queries such as
> {code}
> suggest.cfq={!terms f=contextx}ctx1,ctx2
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]