We implemented something similar it sounds to what you are asking but I
dont see why you would need to match the original field. Since technically
a field that has *software engineer* indexed is matched by a query like
"software eng" .... to "software engineer" with the ngrams; which makes the
exact phrase is still valid.

The problem we where trying to solve was the exact phrase issue which can
be solved with taking in a qs value of 0 (or higher depending on your
definition of exactness).

Maybe an example would help if there is something I am not understanding.

Also your field definitions might help or a example of the schema breakdown
similar to the admin analyze page.

Nick


On Thu, May 5, 2016 at 12:25 AM, Lasitha Wattaladeniya <watt...@gmail.com>
wrote:

> Hi All,
>
> I'm trying to implement a search functionality using solr. Currently I'm
> suing edismax parser with ngram fields to do the search against. So far it
> works well.
>
> The question I have is when the user input double quotations to the search,
> As the requirement this should  match against the original field, not
> against the ngram field.
>
> Currently what I have thought of doing is, identify the double quotations
> in the user input and change the query field (qf) according to that (to
> ngram field or to the exact field). Isn't there any out of the box solution
> for this, I feel like it's a generic requirement and don't want to reinvent
> the wheel. Appreciate your comments
>
> [1]. https://issues.apache.org/jira/browse/SOLR-6842
>
> [2].
>
> http://grokbase.com/t/lucene/solr-user/14cbghncvh/different-fields-for-user-supplied-phrases-in-edismax
>
> Thanks,
>
> Lasitha Wattaladeniya
>
> Software Engineer
>

Reply via email to