Lucene.Net
  1. Lucene.Net
  2. LUCENENET-449

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: Lucene.Net 2.9.2
    • Fix Version/s: None
    • Component/s: Lucene.Net Core
    • Labels:
      None
    • Environment:

      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.

        Activity

        Hide
        Vivien added a comment -

        I figured out the new way of handling it.

        Show
        Vivien added a comment - I figured out the new way of handling it.

          People

          • Assignee:
            Unassigned
            Reporter:
            Vivien
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development