Hmmm, Lucene.Net eh?
There have been a number of bug fixes to ParallelReader over the last
month or two... I wonder if they have been ported to Lucene.Net yet...
(I'm not sure how it's maintained).
You could file a Lucene.net bug, or make a test for the Java version
of Lucene and try it out.
-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server
On 7/19/06, neils <[EMAIL PROTECTED]> wrote:
Hi,
ok, i tried today and it works greate :-) Thanks a lot for your help.
...one question at least... Is sorting not possible with this
Parallelreader? I get an error. Here my code:
Private Sub LoadParallelIndex()
Ram = New Lucene.Net.Store.RAMDirectory("C:\Lucene\index0_Name")
pr = New ParallelReader
pr.Add(IndexReader.Open(Ram))
pr.Add(IndexReader.Open("C:\Lucene\index0_Address"))
pr.Add(IndexReader.Open("C:\Lucene\index0_Locality"))
pr.Add(IndexReader.Open("C:\Lucene\index0_Phonenumbers"))
searcher = New IndexSearcher(pr)
Me.TextBox2.Text += "Added all indexes to ParallelReader" +
vbNewLine
End Sub
Private Sub ParallelSearch(ByVal q As String)
Dim field As SortField = New SortField("Nachname", SortField.STRING,
True)
Dim sortByName As Sort = New Sort(field)
Dim query As Query = QueryParser.Parse(q, "Nachname", New
StandardAnalyzer)
Dim hits As Hits = searcher.Search(query, sortByName)
Me.TextBox2.Text = ("Found " + hits.Length().ToString + "
document(s) that matched query '" + q + vbNewLine)
Me.Refresh()
Dim numHits = hits.Length
If numHits > 250 Then
numHits = 250
End If
For i As Integer = 0 To numHits - 1
Dim doc As Document = hits.Doc(i)
Me.TextBox2.Text += (i + 1).ToString + ".) " +
doc.Get("Nachname").ToString + ", " + doc.Get("Postleitzahl").ToString + " "
+ doc.Get("Postort").ToString + ", " + doc.Get("Vorwahl").ToString + "-" +
doc.Get("Rufnummer").ToString + vbNewLine
Next
End Sub
Can you take a look at it ?
Thanks,
Neils
--
View this message in context:
http://www.nabble.com/Part-of-Index-%28spezial-Field%29-into-Memory-tf1955582.html#a5393608
Sent from the Lucene - Java Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]