lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Bhavsar <anbha...@mailbox.syr.edu>
Subject Adding String in a Field
Date Thu, 18 Sep 2003 13:55:58 GMT
Hi,

I am trying to add fields to a document as show below:

doc.add(Field.Text(fieldName, newString));


Here fieldName and newString are both strings. I wanted to have the words in 
newString searchable, ie indexed.

Currently, I am using a StringTokenizer to get tokens from the string and 
adding '\n' between tokens.

Is there a quicer and cleaner way of doing this reliably?

Here is a sample strings I am trying to add:
"Interactive teaching, Computer simulations, Universe, Computational science, 
GalaxSee software, Solar system, Earth, Sun, Gravity, Gravitational pull, 
Orbits, Velocity"

"http://www.shodor.org/master/galaxsee/ = GalaxSee; http://www.shodor.org/ = 
Shodor Education Foundation, Inc.; http://www.shodor.org/master/ = Master 
Tools; http://www.nap.edu/readingroom/books/nses/html/6e.html#csa912 = Click 
here for further information on NSES standards.; 
http://www.shodor.org/master/dodea/index.html = Click here for additional 
information on DoDDs standards"


Any help/input will be appreciated.

thank you.

amit



Mime
View raw message