lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Lucene-java Wiki] Update of "LuceneFAQ" by JuanGarcia
Date Sat, 22 May 2010 10:34:27 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" for change notification.

The "LuceneFAQ" page has been changed by JuanGarcia.
The comment on this change is: Lucene 1.9 was release long time ago.
http://wiki.apache.org/lucene-java/LuceneFAQ?action=diff&rev1=143&rev2=144

--------------------------------------------------

  
  ==== How can I search over multiple fields? ====
  
+ Searching over multiple fields is what people expect as Google searches all the fields by
default. You have to parse the query using [[http://lucene.apache.org/java/2_9_1/api/all/org/apache/lucene/queryParser/MultiFieldQueryParser.html|MultiFieldQueryParser]].
Note that terms which occur in short fields have a higher effect on the result ranking.
- Parse your query using [[http://lucene.apache.org/java/docs/api/org/apache/lucene/queryParser/MultiFieldQueryParser.html|MultiFieldQueryParser]].
Note that terms which occur in short fields have a higher effect on
- the result ranking. Also !MultiFieldQueryParser builds queries that sometimes behave unexpectedly,
- namely for AND queries: it requires all terms to appear in ''all'' fields. This is not what
one typically
- wants, for example in a search over "title" and "body" fields (Lucene 1.9 fixes this problem).
  
  Alternatively you could create a field which concatenates the content you would like to
search and
  search only that field.

Mime
View raw message