Uploaded image for project: 'Lucene.Net'
  1. Lucene.Net
  2. LUCENENET-449

In Lucene .Net version 2.9.2, method Query.Rewrite() does not work as expected.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • Lucene.Net 2.9.2
    • None
    • Lucene.Net Core
    • None
    • Windows 7, Microsoft .Net 3.5.

    Description

      When WildcardQuery.Rewrite method is called, it calls ConstantScoreAutoRewrite.Rewrite method.
      In this method, int docCountCutoff seems to be 0 for the cases I tested, therefore, docVisitCount is usually greater than
      docCountCutoff, as the result of this, the code block where // Too many terms – make a filter is executed.
      So if we have document (with contents "text cat and cut") indexed, we want to search for c*t, if we set the initial query to have the search criteria c*t, then call query.rewrite(), I am expecting to have the result query with criteria of searching for cat + cut. Version 2.9.2 just returns the original wildcard query, which is not a correct behaviour if you look at version 2.4.1.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pym Vivien
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: