I have a program that uses Lucene.net in ASP.NET (VB.NET), when you search a term, results are stored in the Lucene.net data structure "hits".
I want to read out the hits into an data structure and work with them, after that I display them in a DataGrid
.
By searching a term with a lot of results, often (but not always) there is an error by following code :
For i = 0 To results - 1 Step 1
Try
Dim tmpobj As New object_hit(( _
hits.Doc(i).Get("title") + _
hits.Doc(i).Get("doc_typ")), _
hits.Doc(i).Get("pfad"), _
hits.Doc(i).Get("last_change"), _
hits.Doc(i).Get("doc_typ"), _
CStr(hits.Score(i)))
list_of_results.Add(tmpobj) 'works'
Catch
meldung.Text = "Stackoverflow- zuviele Ergebnisse "
myexception = True
End Try
I checked the server; it's a dwh server and has no problems to execute the program.
At first I used a ReDim Array
, but now I use a List(Of T)
. I heard that should solve the problem, but it doesn't - now I'm very confused and don't know what to do-
can someone help me please?