lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gustavo Corral" <gustavo.cor...@gmail.com>
Subject Weird results with appendable fields
Date Thu, 13 Mar 2008 08:48:04 GMT
Hi list,

I'm new in Lucene and I'm trying to index a set of XML documents
(document-centric) with the same structure. All this documents have a
header, a front, and a body (where there's a lot of text).

The problem is that in the header I have two fields author and title, but
one document can have more than one author, so I tried to index as
appendable field in this way:

ArrayList <String> authors = front.getAuthors();

for(Iterator <String> it = authors.iterator(); it.hasNext();){
    String out (String) it.next();
    if((aut != null) && !aut.equals("")){
         doc.add(new Field("author",aut,Field.StoreYES,Field.Index.TOKENIZED
));
    }
}

and I was searching in my index with Lukeand I obtained rare results. For
example: There's a document with 3 authors which appears as appendable
fields in the index this way: Freddy Pantoja Timaran, Ph.D. Gabriel Pantoja
Barrios Jorge Ivan Londoño.

The thing is that when I search in Luke for Freddy, Pantoja, Gabriel,
Barrios, Iván (all in a different query) i got this document as a Hit,
that's correct, but when I search for Timaran, Londoño I get no Hits, which
is not correct.

I'm using by now WhiteSpaceAnalyzer. Any idea???

Thanks
Gustavo

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message