lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Wiggin" <danut...@gmail.com>
Subject Multisearcher Lucene IOException
Date Thu, 01 Jun 2006 06:46:33 GMT
StackTrace

java.io.IOException: read past EOF
        at org.apache.lucene.store.InputStream.refill(InputStream.java:154)
        at org.apache.lucene.store.InputStream.readByte(InputStream.java:43)
        at org.apache.lucene.store.InputStream.readBytes(InputStream.java
:57)
        at org.apache.lucene.index.SegmentReader.norms(SegmentReader.java
:356)
        at org.apache.lucene.index.MultiReader.norms(MultiReader.java:159)
        at org.apache.lucene.search.TermQuery$TermWeight.scorer(
TermQuery.java:64)
        at org.apache.lucene.search.BooleanQuery$BooleanWeight.scorer(
BooleanQuery.java:165)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java
:117)
        at org.apache.lucene.search.MultiSearcher.search(MultiSearcher.java
:141)
        at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:64)
        at org.apache.lucene.search.Hits.<init>(Hits.java:51)

The executed code is:
        ArrayList newer = new ArrayList();
        SearchResults sr = null;
        Term searchType=null;
        Term searchIdPortal=null;
        RangeQuery dates = findINTODates(days);
        MultiSearcher searcher=iService.getSearcher();
        BooleanQuery combinada = new BooleanQuery();

        TermQuery searchIdEcat = new TermQuery (new Term (
IndexService.ID_ECAT_lucenedoc,g.getId()));
        combinada.add(searchIdEcat,true,false);

        TermQuery searchGroups = new TermQuery (new Term (
IndexService.ECATID_TYPE_lucenedoc,(new Integer(ToolReference.GROUP_ID
)).toString()));
        combinada.add(searchGroups,true,false);

        if (toolId != null){
            searchType=new Term(IndexService.TYPE_lucenedoc,toolId);
            TermQuery searchThisNow= new TermQuery(searchType);
            combinada.add(searchThisNow,true,false);
        }
        combinada.add(dates,true,false);


        //Tb omitiremos los resultados de comentarios de portalPages y de
Grup Pages
        combinada.add(new TermQuery(new Term(IndexService.TYPE_lucenedoc,
IndexService.GroupPage)),false,true);
        combinada.add(new TermQuery(new Term(IndexService.TYPE_lucenedoc,
IndexService.PortalPage)),false,true);
        combinada.add(new TermQuery(new Term(IndexService.TYPE_lucenedoc,
IndexService.PersonalPage)),false,true);
        combinada.add(new TermQuery(new Term(IndexService.TYPE_lucenedoc,
IndexService.Comentario)),false,true);
        combinada.add(new TermQuery(new Term(IndexService.TYPE_lucenedoc,
IndexService.ATTACHMENT)),false,true);

        try{
            SortField[] sorted = new SortField[2];
            sorted[0]=new SortField(IndexService.DATE_lucenedoc,
SortField.STRING, true);
            sorted[1]=new SortField(IndexService.TIME_lucenedoc,
SortField.STRING, true);

            Hits hitsORDERED =searcher.search(combinada,new Sort(sorted));

            log.debug("Query: "+sorted.toString());



Anyone can tell me what is the problem?
I opened in readonly mode my index with luke and I don't have any problem to
check contents.

Could be my index corrupted?
What is the usually code at startup to do a check of integrity of lucene
index? With this code I can detect if my index is corrupted and force to
create a new index.

thks in advance.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message