Using Lucene to Search Java Source Code
Subject:   Searching on multiple fields
Date:   2007-06-23 02:10:27
From:   SimoneB
Hello, I liked your article very much, and I have a question on a point I don't understand completely.

In the last snippet you say that the query can contain multiple fields, say, q="imports:some code:some"

But then when you parse the query you use the code field.

Query query = QueryParser.parse(q, "code", analyzer);

I don't understand what's the relation between the query parser and the analyzer here. You create an analyzer which supports multiple fields, fine, so is it enough to support multiple field search or you have to use a query parser which parses the query on multiple fields?

Thank you very much!

1 to 1 of 1
  1. Searching on multiple fields
    2008-03-20 02:27:15  天草剑歌 [View]

1 to 1 of 1