Hello,
I am indexing books.
Fields are Title,Author, Subtitle, Category,Pages ...
Boosts are TitleBoost 1, AuthorBoost .8 SubtitleBoost .6;
Some one entered a query to search lets say Hitchhiker Guide
Now I want to show the reuslts in which both the words occur based on there
boost score.
I used
MultiFieldQueryParser queryParser = new MultiFieldQueryParser(new String[] {
Constants.TITLEminusAUTHOR,
Constants.AUTHOR_FIELD_NAME, Constants.SUBTITLEminusAUTHOR
}, new StandardAnalyzer());
queryParser.setDefaultOperator(OPERATOR_AND);
The problem comes is that I have author name Douglas Adams and If i search
for that as a query string its not returning any result. But if i remove
setDefaultOperator it returns all douglas Adams with the same query.
Saurabh
Otis Gospodnetic wrote:
>
>
> Hello,
>
> I'm not sure what the question is. You may also want to include an
> example of what you are doing.
> Note that results are typically ordered based on the score of the match
> for each result/hit, not purely the boost, unless you created your own
> Similarity that ignores all other scoring factors except boost/lengthNorm.
>
> Otis
> --
> Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch
>
>
>
> ----- Original Message ----
>> From: saurabhs_iitk <[email protected]>
>> To: [email protected]
>> Sent: Friday, June 19, 2009 2:56:22 AM
>> Subject: Multi Field AND Search
>>
>>
>> Hi
>> I have indexed 8 fileds with different boost. Now i have given a
>> searchstring which consists of a words and phrases. Now i want to do AND
>> search of that searchString on four fields and show the result based on
>> boost. For me searchString should occur completely in one of the field
>> and
>> then the boosts come into picture. I know i can index combination of four
>> fields in one and then search in that but then the boost will not work.
>>
>> Regards
>> Saurabh
>> --
>> View this message in context:
>> http://www.nabble.com/Multi-Field-AND-Search-tp24106434p24106434.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>
>
>
--
View this message in context:
http://www.nabble.com/Multi-Field-AND-Search-tp24106434p24123205.html
Sent from the Solr - User mailing list archive at Nabble.com.