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


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 toString().substring(0,toString.indexOf("<")),
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.

thanks



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



Thanks


Michi


Erik



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




--
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com              http://cocoon.apache.org/lenya/
[EMAIL PROTECTED]                        [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to