lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cauvery Developer" <kaveriopensou...@gmail.com>
Subject Re: Document.getField(field).stringValue() behavior
Date Sat, 01 Dec 2007 09:43:59 GMT
aaaaaaaaaaarghhhhhhh !!!!

You are right, Michael. Apologies for the stupid question.

Regards,
Nags.

On Dec 1, 2007 3:07 PM, Michael McCandless <lucene@mikemccandless.com>
wrote:

>
> If you call .stringValue() you should get just that string?
>
> (You are now calling .toString()).
>
> Mike
>
> "Cauvery Developer" <kaveriopensource@gmail.com> wrote:
> > Hi,
> > I am working with demo and I am displaying the search results as :
> >
> > Hits ht = is.search(q);
> > for (int i = 0; i <= ht.length(); i++) {
> >      Document hitDoc = ht.doc(i);
> >      queryResult.add(hitDoc.getField("name").toString() + "~"
> >      + hitDoc.getField("date").toString());
> > System.out.println(queryResult) ;
> > }
> >
> > I get the following output :
> >
> >
> stored/uncompressed,indexed<name:HWORLD>~stored/uncompressed,indexed<date:Fri
> > Nov 30 23:43:50 PST 2007>
> >
> > The result "HWORLD" and "Fri Nov 30 23:43:50 PST 2007" is correct. But,
> I
> > was under the impression that the output would simply be
> >
> > HWORLD~Fri Nov 30 23:43:50 PST 2007
> >
> > Therefore, should the output of Document.getField(field).stringValue()
> > behavior be further parsed to get directly to the term that was added  ?
> >
> > Thanks and regards,
> > Nags
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>

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