lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wechner <>
Subject Re: method for getting the field type
Date Sun, 09 May 2004 09:26:42 GMT
Erik Hatcher wrote:

> On May 8, 2004, at 7:50 PM, Michael Wechner wrote:
>> which would return something like
>> Text, UnIndexed, etc.
>> or am I overlooking something?
>> I have seen that toString() is delivering the type as part of the 
>> return value,
>> but I think it would make sense to get this information without 
>> string manipulation.
>> WDYT?
> Just out of curiosity, what would you do with the type of the field?

I'll output the search results as XML (for Lenya) and would like to add 
the field type as attribute, e.g.

<results total-hits="1">
   <hit pos="1">
<year type="Unindexed">2004</year>
<subtitle type="Text">Untertitel</subtitle>
<field>Text<title:Dear Lenya></field>
<title type="Text">Dear Lenya</title>
<modified type="Keyword">0du06ovtc</modified>
<mime-type type="Unindexed">null</mime-type>
<url type="Unindexed">/2004/05/08/al/kommentarDU04HGF8-12.nzzoml</url>
<score percent="22">0.21875</score>
<uri parent="/2004/05/08/al" filename="kommentarDU04HGF8-12.nzzoml" 
<title>Liebe Levi</title>
 <page start="1" end="1" type="current">

> It's useful to me to have something tangible in mind.

sure. Depending on the field type the XSLT then can show it in various ways.
I'm currently extracting it via 
which doesn't really hurt, but still ;-)

>> btw, the Javadoc of isTermVectorStored() has a typo: available 
>> instead avaliable, but maybe this has been fixed within the CVS already.
> This has been corrected in the CVS version.


btw, the XML above grew on my own mindset. It would be cool to 
standardize it
across the various search engines.



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

Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya                  

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

View raw message