lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Rafalovitch <arafa...@gmail.com>
Subject Re: Solr Search - Issue
Date Tue, 14 Feb 2017 15:37:22 GMT
Where do the sentence boundaries come from? Solr would not be able to
automatically identify those, but if you can feed this text as a
multi-valued field with each sentence separate, you may be able to use
something like SurroundQueryParser:
https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-SurroundQueryParser

You may need to bump up positionIncrementGap on the field type
definition to ensure the start of the sentence is far enough from the
end of the previous one (multivalued fields are one big fields under
the covers with positionIncrementGap as the 'space' between the
values).

Regards,
   Alex.
----
http://www.solr-start.com/ - Resources for Solr users, new and experienced


On 14 February 2017 at 08:42, Neeraj Kumar <neeraj.kumar.ext@bayer.com> wrote:
> Hi Team,
>
> I am new to solr and need your help. My problem statement is as below....
>
> I have uploaded document in solr as below. #sb# represents sentence begining and #se#
represents senetence ending. Now I want to search terms which occur in same sentence .  If
I search for q=text:"Federer Wimbledon" ,  below document should come in search result as
both the terms occur in same senetence. If I search for q=text:"Federer Rafa" ,below document
should not come in search result as the terms occur in different sentences.
>
> #sb#Federer, who looked ahead at Sunday's final, calling it an 'epic battle', said, "Maybe
I lost the Wimbledon final in 2008 because of too many clay court matches #se##sb# He crushed
me at the French Open final #se##sb# I think it affected my first two sets at Wimbledon #se##sb#
Maybe that's why I ended up losing#se##sb# The Swiss continued, "I know Rafa played great
in that final #se##sb# I actually ended up playing great too, but I wasn't fighting the right
way #se##sb# I think that was the effect of that French Open loss. It was more mental #se#
> Could you please tell me how to fire query to achieve this.
>
> Thanks
> Neeraj

Mime
View raw message