Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Threaded View
Lucene, mail # user - spnafirstquery and multiple field instances


Copy link to this message
-
Re: spnafirstquery and multiple field instances
Chris Hostetter 2006-12-22, 06:03

: for (String key : title.getTitel().split("\\n")  ) {
: titleDocument.add(new Field("TI", key, Field.Store.NO,
: Field.Index.TOKENIZED));
: }

that adds each new title one after the other with your analyzers
"getPositionIncrimentGap" in between them.

: but that didn't work. The query finds only matches for the first token
: in that field of a document.

you can insert an arbitrary marker token in between each title and search
for it with a spannearquery ... serach the archive for "sentence boundary"
or "page boundary"
-Hoss
---------------------------------------------------------------------