Hi Mike,
The order does not matter at all in all versions of Lucene. You also don't
need to subclass AbstractField (but you can use e.g. NumericField as an
example); it is enough to use new Field(name, TokenStream); if you also want
to store this field, simply add a stored-only field with the *sam
I have a question about the API for storing and indexing lucene
documents (in 3.x).
If I want to index a document by providing a TokenStream, I can do that
by calling document.add (field) where field is something I write
deriving from AbstractField that returns the TokenStream for
tokenStream
Much more clear explanation than the wiki! Thanks!
--
View this message in context:
http://lucene.472066.n3.nabble.com/Index-of-Lucene-tp555857p3994239.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.
-
Amir,
CachedDistanceValueSource is indeed poorly named; I need to get renaming it
on the TODO list; I've identified this before. Calculating the distance is
computationally cheap enough to calculate for the X number of results
(top-20-ish) you are returning in your search results to not bother tr
If you can live with the loss of 385395 documents, running with -fix
is an option. I'd create a new index. I'd also worry about why the
existing index got messed up in the first place.
I've no idea about running fsck on ec2 file systems. General file
system commands hanging for 10 secs doesn't s
thank you very much. it's good for me.
--- 12年7月10日,周二, feng lu [via Lucene]
写道:
发件人: feng lu [via Lucene]
主题: Re: about some seacher(I'm new hand, thank you for help)
收件人: "sam"
日期: 2012年7月10日,周二,下午4:25
hi sam
you can add content and time stamp field like this.
// add content
hi sam
you can add content and time stamp field like this.
// add content
doc.add(new Field("contents", content,Field.Store.NO,Field.Index.ANALYZED);
// add timestamp
NumericField timestampField = new NumericField("timestamp");
timestampField.setLongValue(DateField.stringToTime(timestamp));
but,how can i used it in lucene
File logFile= new File("D:\\logFile");
BufferedReader reader=null;
String str = null;
reader = new BufferedReader(new FileReader(logFile));
while
I have to use stable versions too, and that's why I delayed upgrading my
code until 4.0-ALPHA was out. Since I don't have any problems with API
breaks, i.e. I'm only concerned with index format back-compat, 4.0-ALPHA to
me was stable.
If you require both index format + stable API, then wait for 4.