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

Search on several terms returns invalid data

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Information Provided
    • Lucene.Net 3.0.3
    • Lucene.Net 3.0.3
    • None
    • None
    • Windows 10 x64, .NET 4.5.2

    Description

      We have Index on 3 fields:
      map.Key(p => p.ChildId);
      map.Property(p => p.ChildId).NotAnalyzed().Stored();
      map.Property(p => p.Organization).AnalyzeWith(new KeywordAnalyzer()).Stored();
      map.Property(p => p.YearOfRest).AnalyzeWith(new KeywordAnalyzer()).Stored();

      And we make simple query:
      Lucene.Net.Search.IndexSearcher searcher = new Lucene.Net.Search.IndexSearcher(dir);
      BooleanQuery booleanQuery = new BooleanQuery();
      var analyzer = new StandardAnalyzer(Version.LUCENE_30);
      var query = new QueryParser(Lucene.Net.Util.Version.LUCENE_30, "Organization", analyzer).Parse("199");

      var query2 = new QueryParser(Lucene.Net.Util.Version.LUCENE_30, "YearOfRest", analyzer).Parse("1");

      booleanQuery.Add(query , Occur.MUST);
      booleanQuery.Add(query2 , Occur.MUST);

      var doc = searcher.Search(booleanQuery, 20);

      doc has invalid data(docs with organization = 0), we checked query in Luke program, and everything work fine. Sometimes, program crashes with IndexOutOfRangeException somewhere in scorer doc has Id over bigger than actual in index.
      Querying on one field works fine.
      Can attach or send index file in 50 Mb

      Attachments

        1. image001.png
          47 kB
          Vilen Tambovtsev
        2. RestChild.7z
          141 kB
          Popov Egor
        3. TestLucene.7z
          163 kB
          Popov Egor

        Activity

          People

            Unassigned Unassigned
            popoveo Popov Egor
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: