You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Vivek Gupta (JIRA)" <ji...@apache.org> on 2006/11/10 20:26:38 UTC

[jira] Created: (LUCENENET-28) Problem with multiple indices and multisearcher

Problem with multiple indices and multisearcher
-----------------------------------------------

                 Key: LUCENENET-28
                 URL: http://issues.apache.org/jira/browse/LUCENENET-28
             Project: Lucene.Net
          Issue Type: Bug
         Environment: Windows XP, Visual Studio Pro 2005, .Net 2.0, Lucene .net 1.9 Final RC 007
            Reporter: Vivek Gupta


Hi,

I am working on a project where we have created an application that searches an index that is created by a service.  The service continually watches a directory and updates the index.  This part works fine.  I have now added a second index created by another application.  I would like to be able to search across both indexes.  So I made changes to my first application so that it uses multisearcher passing in an array of searchers for both of the indexes I want to search.  However, this seems to result in an error (shown further down).  Also, both indexes have the same fields and either one works fine by itself, it is just when multisearcher is introduced that I end up with a problem.  The first query typically works, but queries after that fail and it is independent of whether or not the index is in the process of building (though it may be more often when one of the indexes is still being updated).

Here is the error I get:

Object reference not set to an instance of an object.
   at Lucene.Net.Store.FSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len) in C:\development\Lucene.Net.1.9.rc7\Store\FSDirectory.cs:line 740
   at Lucene.Net.Store.BufferedIndexInput.ReadBytes(Byte[] b, Int32 offset, Int32 len) in C:\development\Lucene.Net.1.9.rc7\Store\BufferedIndexInput.cs:line 53
   at Lucene.Net.Index.CompoundFileReader.CSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len) in C:\development\Lucene.Net.1.9.rc7\Index\CompoundFileReader.cs:line 246
   at Lucene.Net.Store.BufferedIndexInput.Refill() in C:\development\Lucene.Net.1.9.rc7\Store\BufferedIndexInput.cs:line 74
   at Lucene.Net.Store.BufferedIndexInput.ReadByte() in C:\development\Lucene.Net.1.9.rc7\Store\BufferedIndexInput.cs:line 36
   at Lucene.Net.Store.IndexInput.ReadVInt() in C:\development\Lucene.Net.1.9.rc7\Store\IndexInput.cA first chance exception of type 'System.NullReferenceException' occurred in Lucene.Net.dll
s:line 63
   at Lucene.Net.Index.TermBuffer.Read(IndexInput input, FieldInfos fieldInfos) in C:\development\Lucene.Net.1.9.rc7\Index\TermBuffer.cs:line 70
   at Lucene.Net.Index.SegmentTermEnum.Next() in C:\development\Lucene.Net.1.9.rc7\Index\SegmentTermEnum.cs:line 130
   at Lucene.Net.Index.SegmentTermEnum.ScanTo(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\SegmentTermEnum.cs:line 166
   at Lucene.Net.Index.TermInfosReader.ScanEnum(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\TermInfosReader.cs:line 175
   at Lucene.Net.Index.TermInfosReader.Get(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\TermInfosReader.cs:line 168
   at Lucene.Net.Index.TermInfosReader.Terms(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\TermInfosReader.cs:line 236
   at Lucene.Net.Index.SegmentReader.Terms(Term t) in C:\development\Lucene.Net.1.9.rc7\Index\SegmentReader.cs:line 317
   at Lucene.Net.Search.PrefixQuery.Rewrite(IndexReader reader) in C:\development\Lucene.Net.1.9.rc7\Search\PrefixQuery.cs:line 49
   at Lucene.Net.Search.BooleanQuery.Rewrite(IndexReader reader) in C:\development\Lucene.Net.1.9.rc7\Search\BooleanQuery.cs:line 514
   at Lucene.Net.Search.IndexSearcher.Rewrite(Query original) in C:\development\Lucene.Net.1.9.rc7\Search\IndexSearcher.cs:line 276
   at Lucene.Net.Search.MultiSearcher.Rewrite(Query original) in C:\development\Lucene.Net.1.9.rc7\Search\MultiSearcher.cs:line 333
   at Lucene.Net.Search.Query.Weight(Searcher searcher) in C:\development\Lucene.Net.1.9.rc7\Search\Query.cs:line 98
   at Lucene.Net.Search.Hits..ctor(Searcher s, Query q, Filter f) in C:\development\Lucene.Net.1.9.rc7\Search\Hits.cs:line 41
   at Lucene.Net.Search.Searcher.Search(Query query, Filter filter) in C:\development\Lucene.Net.1.9.rc7\Search\Searcher.cs:line 54
   at Lucene.Net.Search.Searcher.Search(Query query) in C:\development\Lucene.Net.1.9.rc7\Search\Searcher.cs:line 45

Thanks,
Vivek Gupta

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (LUCENENET-28) Problem with multiple indices and multisearcher

Posted by "George Aroush (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-28?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Aroush reassigned LUCENENET-28:
--------------------------------------

    Assignee: George Aroush

> Problem with multiple indices and multisearcher
> -----------------------------------------------
>
>                 Key: LUCENENET-28
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-28
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: Windows XP, Visual Studio Pro 2005, .Net 2.0, Lucene .net 1.9 Final RC 007
>            Reporter: Vivek Gupta
>         Assigned To: George Aroush
>
> Hi,
> I am working on a project where we have created an application that searches an index that is created by a service.  The service continually watches a directory and updates the index.  This part works fine.  I have now added a second index created by another application.  I would like to be able to search across both indexes.  So I made changes to my first application so that it uses multisearcher passing in an array of searchers for both of the indexes I want to search.  However, this seems to result in an error (shown further down).  Also, both indexes have the same fields and either one works fine by itself, it is just when multisearcher is introduced that I end up with a problem.  The first query typically works, but queries after that fail and it is independent of whether or not the index is in the process of building (though it may be more often when one of the indexes is still being updated).
> Here is the error I get:
> Object reference not set to an instance of an object.
>    at Lucene.Net.Store.FSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len) in C:\development\Lucene.Net.1.9.rc7\Store\FSDirectory.cs:line 740
>    at Lucene.Net.Store.BufferedIndexInput.ReadBytes(Byte[] b, Int32 offset, Int32 len) in C:\development\Lucene.Net.1.9.rc7\Store\BufferedIndexInput.cs:line 53
>    at Lucene.Net.Index.CompoundFileReader.CSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len) in C:\development\Lucene.Net.1.9.rc7\Index\CompoundFileReader.cs:line 246
>    at Lucene.Net.Store.BufferedIndexInput.Refill() in C:\development\Lucene.Net.1.9.rc7\Store\BufferedIndexInput.cs:line 74
>    at Lucene.Net.Store.BufferedIndexInput.ReadByte() in C:\development\Lucene.Net.1.9.rc7\Store\BufferedIndexInput.cs:line 36
>    at Lucene.Net.Store.IndexInput.ReadVInt() in C:\development\Lucene.Net.1.9.rc7\Store\IndexInput.cA first chance exception of type 'System.NullReferenceException' occurred in Lucene.Net.dll
> s:line 63
>    at Lucene.Net.Index.TermBuffer.Read(IndexInput input, FieldInfos fieldInfos) in C:\development\Lucene.Net.1.9.rc7\Index\TermBuffer.cs:line 70
>    at Lucene.Net.Index.SegmentTermEnum.Next() in C:\development\Lucene.Net.1.9.rc7\Index\SegmentTermEnum.cs:line 130
>    at Lucene.Net.Index.SegmentTermEnum.ScanTo(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\SegmentTermEnum.cs:line 166
>    at Lucene.Net.Index.TermInfosReader.ScanEnum(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\TermInfosReader.cs:line 175
>    at Lucene.Net.Index.TermInfosReader.Get(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\TermInfosReader.cs:line 168
>    at Lucene.Net.Index.TermInfosReader.Terms(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\TermInfosReader.cs:line 236
>    at Lucene.Net.Index.SegmentReader.Terms(Term t) in C:\development\Lucene.Net.1.9.rc7\Index\SegmentReader.cs:line 317
>    at Lucene.Net.Search.PrefixQuery.Rewrite(IndexReader reader) in C:\development\Lucene.Net.1.9.rc7\Search\PrefixQuery.cs:line 49
>    at Lucene.Net.Search.BooleanQuery.Rewrite(IndexReader reader) in C:\development\Lucene.Net.1.9.rc7\Search\BooleanQuery.cs:line 514
>    at Lucene.Net.Search.IndexSearcher.Rewrite(Query original) in C:\development\Lucene.Net.1.9.rc7\Search\IndexSearcher.cs:line 276
>    at Lucene.Net.Search.MultiSearcher.Rewrite(Query original) in C:\development\Lucene.Net.1.9.rc7\Search\MultiSearcher.cs:line 333
>    at Lucene.Net.Search.Query.Weight(Searcher searcher) in C:\development\Lucene.Net.1.9.rc7\Search\Query.cs:line 98
>    at Lucene.Net.Search.Hits..ctor(Searcher s, Query q, Filter f) in C:\development\Lucene.Net.1.9.rc7\Search\Hits.cs:line 41
>    at Lucene.Net.Search.Searcher.Search(Query query, Filter filter) in C:\development\Lucene.Net.1.9.rc7\Search\Searcher.cs:line 54
>    at Lucene.Net.Search.Searcher.Search(Query query) in C:\development\Lucene.Net.1.9.rc7\Search\Searcher.cs:line 45
> Thanks,
> Vivek Gupta

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (LUCENENET-28) Problem with multiple indices and multisearcher

Posted by "George Aroush (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-28?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Aroush closed LUCENENET-28.
----------------------------------

    Resolution: Invalid

Hi Vivek,

What you are reporting is not necessarily a defect in Lucene.Net; it is more like a question.  Please post this question on the Lucene.Net development form with a sample code which re-creates the problem and someone should be able to help you.

I am closing this issue.

Regards,

-- George

> Problem with multiple indices and multisearcher
> -----------------------------------------------
>
>                 Key: LUCENENET-28
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-28
>             Project: Lucene.Net
>          Issue Type: Bug
>         Environment: Windows XP, Visual Studio Pro 2005, .Net 2.0, Lucene .net 1.9 Final RC 007
>            Reporter: Vivek Gupta
>         Assigned To: George Aroush
>
> Hi,
> I am working on a project where we have created an application that searches an index that is created by a service.  The service continually watches a directory and updates the index.  This part works fine.  I have now added a second index created by another application.  I would like to be able to search across both indexes.  So I made changes to my first application so that it uses multisearcher passing in an array of searchers for both of the indexes I want to search.  However, this seems to result in an error (shown further down).  Also, both indexes have the same fields and either one works fine by itself, it is just when multisearcher is introduced that I end up with a problem.  The first query typically works, but queries after that fail and it is independent of whether or not the index is in the process of building (though it may be more often when one of the indexes is still being updated).
> Here is the error I get:
> Object reference not set to an instance of an object.
>    at Lucene.Net.Store.FSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len) in C:\development\Lucene.Net.1.9.rc7\Store\FSDirectory.cs:line 740
>    at Lucene.Net.Store.BufferedIndexInput.ReadBytes(Byte[] b, Int32 offset, Int32 len) in C:\development\Lucene.Net.1.9.rc7\Store\BufferedIndexInput.cs:line 53
>    at Lucene.Net.Index.CompoundFileReader.CSIndexInput.ReadInternal(Byte[] b, Int32 offset, Int32 len) in C:\development\Lucene.Net.1.9.rc7\Index\CompoundFileReader.cs:line 246
>    at Lucene.Net.Store.BufferedIndexInput.Refill() in C:\development\Lucene.Net.1.9.rc7\Store\BufferedIndexInput.cs:line 74
>    at Lucene.Net.Store.BufferedIndexInput.ReadByte() in C:\development\Lucene.Net.1.9.rc7\Store\BufferedIndexInput.cs:line 36
>    at Lucene.Net.Store.IndexInput.ReadVInt() in C:\development\Lucene.Net.1.9.rc7\Store\IndexInput.cA first chance exception of type 'System.NullReferenceException' occurred in Lucene.Net.dll
> s:line 63
>    at Lucene.Net.Index.TermBuffer.Read(IndexInput input, FieldInfos fieldInfos) in C:\development\Lucene.Net.1.9.rc7\Index\TermBuffer.cs:line 70
>    at Lucene.Net.Index.SegmentTermEnum.Next() in C:\development\Lucene.Net.1.9.rc7\Index\SegmentTermEnum.cs:line 130
>    at Lucene.Net.Index.SegmentTermEnum.ScanTo(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\SegmentTermEnum.cs:line 166
>    at Lucene.Net.Index.TermInfosReader.ScanEnum(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\TermInfosReader.cs:line 175
>    at Lucene.Net.Index.TermInfosReader.Get(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\TermInfosReader.cs:line 168
>    at Lucene.Net.Index.TermInfosReader.Terms(Term term) in C:\development\Lucene.Net.1.9.rc7\Index\TermInfosReader.cs:line 236
>    at Lucene.Net.Index.SegmentReader.Terms(Term t) in C:\development\Lucene.Net.1.9.rc7\Index\SegmentReader.cs:line 317
>    at Lucene.Net.Search.PrefixQuery.Rewrite(IndexReader reader) in C:\development\Lucene.Net.1.9.rc7\Search\PrefixQuery.cs:line 49
>    at Lucene.Net.Search.BooleanQuery.Rewrite(IndexReader reader) in C:\development\Lucene.Net.1.9.rc7\Search\BooleanQuery.cs:line 514
>    at Lucene.Net.Search.IndexSearcher.Rewrite(Query original) in C:\development\Lucene.Net.1.9.rc7\Search\IndexSearcher.cs:line 276
>    at Lucene.Net.Search.MultiSearcher.Rewrite(Query original) in C:\development\Lucene.Net.1.9.rc7\Search\MultiSearcher.cs:line 333
>    at Lucene.Net.Search.Query.Weight(Searcher searcher) in C:\development\Lucene.Net.1.9.rc7\Search\Query.cs:line 98
>    at Lucene.Net.Search.Hits..ctor(Searcher s, Query q, Filter f) in C:\development\Lucene.Net.1.9.rc7\Search\Hits.cs:line 41
>    at Lucene.Net.Search.Searcher.Search(Query query, Filter filter) in C:\development\Lucene.Net.1.9.rc7\Search\Searcher.cs:line 54
>    at Lucene.Net.Search.Searcher.Search(Query query) in C:\development\Lucene.Net.1.9.rc7\Search\Searcher.cs:line 45
> Thanks,
> Vivek Gupta

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira