Hello, Andi Vajda.

AV> Great, this would get us one step closer to a 1.0 release !

Andi, I have that problem appeared again. It works great on Windows
platform, and it worked good on RedHat Linux.
But when we migrated to Debian with kernel 2.6.11 the problem has appeared 
again.

Can you suggest us how to detect the real reason of this bug with hits
on Debian Linux?

---------- Forward Message ----------
From:   Yura Smolsky <[EMAIL PROTECTED]>
To:     [email protected]
CC:     
Time:   Mon, 28 Feb 2005 09:28:04 -0600
Subj:   [pylucene-dev] ParallelMultiSearcher and Hits.doc(i)
Attach: RemoteSearcherBad.py, Часть.txt

Hello.

I have noticed that ParallelMultiSearcher does not return correct Hits
object when we use custom implemented Searchable, but MultiSearcher return 
correct one.
"Correct" object Hits object means that it can return documents more
than 100th.

So, I cannot get documents more than 100th from Hits object returned
by ParallelMultiSearcher (with custom implemented Searchable object).
When It cannot return needed object it loops forever, it does not
return control outside Hits.doc(i) method.

I provide attach file which can easily reproduce the situation.

Yura Smolsky.


---------- End of Forward ----------

Yura Smolsky,
#!/cygdrive/d/WORK/PYTHON24/python

from PyLucene import *

class RemoteSearcher(Object):
    def __init__(self, local):
        self.local = local
    def close(self):
        self.local.close()
    def docFreq(self, term):
        return self.local.docFreq(term)
    def maxDoc(self):
        return self.local.maxDoc()
    def searchAll(self, query, filter, hitCollector):
        return self.local.search(query, filter, hitCollector)
    def search(self, query, filter, n):
        return self.local.search(query, filter, n)
    def searchSorted(self, query, filter, n, sort):
        return self.local.search(query, filter, n, sort)
    def doc(self, i):
        return self.local.doc(int(i))
    def rewrite(self, original):
        return self.local.rewrite(original)
    def explain(self, query, doc):
        print 'e',
        return self.local.explain(query, doc)
    
dir = FSDirectory.getDirectory("index/index03", False)
a = StandardAnalyzer()
searcher = IndexSearcher(dir)

remote = RemoteSearcher(searcher)

# create MultiSearcher with one Searcher
#parallel = MultiSearcher([remote])           # works fine
parallel = ParallelMultiSearcher([remote])   # does not work

query = QueryParser.parse("good", "content", a)

hits = parallel.search(query)
print hits.length()
for i in range(hits.length()):
    print i,
    hits.doc(i)
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to