Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev
[jira] Created: (LUCENE-1733) term field equality in
 

Index | Next | Previous | View Flat


jira at apache

Jul 3, 2009, 9:53 AM


Views: 127
Permalink
[jira] Created: (LUCENE-1733) term field equality in

term field equality in
-----------------------

Key: LUCENE-1733
URL: https://issues.apache.org/jira/browse/LUCENE-1733
Project: Lucene - Java
Issue Type: Bug
Components: Index
Reporter: Ali Oral


The ordering of terms is first by field, then by text.*/
public final int compareTo(Term other) {
if (field == other.field) // fields are interned
return text.compareTo(other.text);
else
return field.compareTo(other.field);
}

I am developing a custom query object. I had unexpected results time to time. When I debugged the code I found that Term.compareTo() method returns inconsistent values. When I changed field == other.field statement to field.equals(other.field) the problem was solved.




--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe[at]lucene.apache.org
For additional commands, e-mail: java-dev-help[at]lucene.apache.org

Subject User Time
[jira] Created: (LUCENE-1733) term field equality in jira at apache Jul 3, 2009, 9:53 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.