All, Sorry, but I inadvertenly put my post re MultiFieldQueryParser in the wrong thread (wrong subject via cut and paste).
Igor, thank you for the reply. I will look into what you suggest. -Paul On Wed, Apr 3, 2013 at 6:58 AM, Igor Shalyminov <ishalymi...@yandex-team.ru>wrote: > I personally use SpanNearQuey (span positions are always needed), and for > different fields I use FieldMaskingSpanQuery class. > I just choose one field name and then mask each SpanTermQuery's real field > name with this field via wrapper. > > Maybe it can help. > > -- > Igor > > 03.04.2013, 06:59, "Paul" <arach...@gmail.com>: > > Hi, > > > > I've experimented a bit with MultiFieldQueryParser ( > http://lucene.apache.org/core/4_2_0/queryparser/org/apache/lucene/queryparser/classic/MultiFieldQueryParser.html > ) > > > > But it seems to search for each of a query's terms in each field > specified in the constructor. So, as the doc says, if you query on two > terms against two fields, it will search for each term in each field. > > > > What's the best way to construct a search for, say, two terms where one > should be looked for in field1 and the other in field2? Can this be done by > a BooleanQuery that ANDs two TermQuerys? > > > > I read something about the abstract class MultiTermQuery, but I don't > really understand whether or not it would help with this problem. > > > > Thank you. > > > > -Paul > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > > For additional commands, e-mail: java-user-h...@lucene.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >