Please use JIRA, not Bugzilla.
I thought our Bugzilla was disabled? If not, shouldn't it be?
Erik
On May 25, 2007, at 7:28 AM, [EMAIL PROTECTED] wrote:
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=4568>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=4568
[EMAIL PROTECTED] changed:
What |Removed |Added
----------------------------------------------------------------------
------
Status|RESOLVED |REOPENED
Resolution|FIXED |
------- Additional Comments From [EMAIL PROTECTED]
2007-05-25 04:28 -------
Please see my code below: I create a index with two documents. When
using term()
I get all terms, when using term(new Term(...)) I only get one. I'm
using
lucene-2.1.0. The code produces the following output on my machine:
INFO: term(): contents:London
INFO: term(): unused:foobar
INFO: term(new Term()): unused:foobar
Code:
Directory store = new RAMDirectory();
IndexWriter writer = new IndexWriter(store, new
WhitespaceAnalyzer(), true);
Document doc1 = new Document();
doc1.add(new Field(FIELD_NAME, "London", Field.Store.YES,
Field.Index.TOKENIZED));
writer.addDocument(doc1);
Document doc2 = new Document();
doc2.add(new Field("unused", "foobar", Field.Store.YES,
Field.Index.TOKENIZED));
writer.addDocument(doc2);
writer.optimize();
writer.close();
IndexReader indexReader = null;
TermEnum termEnum = null;
try
{
indexReader = IndexReader.open(store);
termEnum = indexReader.terms();
while (termEnum.next()) { LOGGER.log(Level.INFO, "term
(): " +
termEnum.term()); }
termEnum = indexReader.terms(new Term(FIELD_NAME, ""));
while (termEnum.next()) { LOGGER.log(Level.INFO, "term
(new Term()):
" + termEnum.term()); }
}
finally
{
if (indexReader != null) { indexReader.close(); }
}
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?
tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]