lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Lu" <>
Subject Re: Lucene DB indexing and searching Question (1.9.1)
Date Thu, 27 Apr 2006 15:54:54 GMT
You need to use MultiFieldQueryParser

Chris Lu
Full-text search on Any Databases/Applications

On 4/27/06, Audrius Peseckis <> wrote:
> Hello,
> What I'm trying to do is to index database with lucene. Each row returned by SQL query
is represented as document, and document contains fields (values of columns). I'm adding those
fields to document by doing the following:
> Field fld = new Field("COLUMN_NAME", column.value());
> Now when I'm trying to search the index, I only get the values of the column text (default
field name).
> Searcher searcher = new IndexSearcher(DIR);
> QueryParser qp = new QueryParser("text", new StandardAnalyzer());
> Query query = qp.parse("a*");
> How to query a search engine, if I want to get results from all indexed fields, not only
default provided?
> Thanks in advance,
> Audrius

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message