[
https://issues.apache.org/jira/browse/LUCENE-1733?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ali Oral closed LUCENE-1733.
----------------------------
Resolution: Invalid
> Term.compareTo returns unexpected results. (field == other.field)
> ------------------------------------------------------------------
>
> Key: LUCENE-1733
> URL: https://issues.apache.org/jira/browse/LUCENE-1733
> Project: Lucene - Java
> Issue Type: Bug
> Components: Index
> Reporter: Ali Oral
> Priority: Minor
>
> 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 class. I had unexpected results time to time.
> When I debugged the code I found that Term.compareTo() method returns
> inconsistent values. AfterI 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: [email protected]
For additional commands, e-mail: [email protected]