Thanks for the help we are going to try Step 1 and Step 3 as a last option.
I have never done remoting but my basic understanding of it is that Client and the Remote service both have to be .NET(Or same language) in order to work correct. Our test client is php I think. Scott Remiger 888 Lumber Exchange Building 10 South Fifth Street Minneapolis, MN 55402 O: 612.238.4951 F: 612.746.4237 -----Original Message----- From: Digy [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2008 1:18 PM To: lucene-net-user@incubator.apache.org Subject: RE: Convert Hits to XML 1- To convert the result to xml-string and passing that string to client also needs a serialization/deserializtion process between client and WebService(of course less costly). But I, personally, prefer passing objects(not xml) to clients since that makes coding of the client easier. 2- While iterating through the results, you can directly create the xml string like stringBuilder.Append("<RecipeID>" + recipeID + "</RecipeID>"); without converting to an intermediate structure 3- To get the best performance, you can use "Remoting" and, pass the result directly to the client. You can find an example at http://issues.apache.org/jira/browse/LUCENENET-100 (RemotingTest.rar) 4- >We look at the HitsCollector (maybe not hard enough) do you still have >to convert that to a document in order to get the Values of the >document? I haven't understand your question. DIGY -----Original Message----- From: Scott Remiger [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2008 8:39 PM To: lucene-net-user@incubator.apache.org Subject: RE: Convert Hits to XML That works and it is a thought but wouldn't it make more sense to convert the Hits right to xml. Either way I still have this middle step of taking hits to some other object then convert to xml. We look at the HitsCollector (maybe not hard enough) do you still have to convert that to a document in order to get the Values of the document? Scott Remiger 888 Lumber Exchange Building 10 South Fifth Street Minneapolis, MN 55402 O: 612.238.4951 F: 612.746.4237 -----Original Message----- From: Digy [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2008 12:24 PM To: lucene-net-user@incubator.apache.org Subject: RE: Convert Hits to XML First of all, collecting large results using "Hits" object is too slow since it re-executes the search internally when you need more than 100 hits. It is better to use the "HitCollector". Second, Why don't you return an array of a custom object and let the WebServer make the serialization for you. Like; [Serializable] public class MyClass { public string RecipeID; public string RecipeTitle; ..... } [WebMethod] Public MyClass[] GetMyClasses() { MyClass[] myclasses = new MyClass[resultCount]; for(int i=0 ; i<resultCount ; i++){ myclasses[i] = new MyClass(); myclasses[i].RecipeID = .... myclasses[i].RecipeTitle = .... ..... } return myclasses; } DIGY -----Original Message----- From: Scott Remiger [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2008 6:47 PM To: lucene-net-user@incubator.apache.org Subject: Convert Hits to XML We are currently converting the hits to a dataset then onto an XML document which seems inefficient Can someone suggest a better way of doing this? The web service will time out when we get to about 36 thousands hits we want to get the web service wide open(not limit the number of records to return); Hits _oRecipeHits = _oLuceneIndexSearch.ExecuteSearch(_bqQuery, INDEXPATH); DataTable _dtSearchResults = new DataTable(); _dtSearchResults.Columns.Add("RecipeID", typeof(string)); _dtSearchResults.Columns.Add("RecipeTitle", typeof(string)); _dtSearchResults.Columns.Add("Ingredients", typeof(string)); _dtSearchResults.Columns.Add("Course", typeof(string)); _dtSearchResults.Columns.Add("Equipment", typeof(string)); _dtSearchResults.Columns.Add("Holiday", typeof(string)); _dtSearchResults.Columns.Add("CookTime", typeof(string)); _dtSearchResults.Columns.Add("SkillLevel", typeof(string)); _dtSearchResults.Columns.Add("RecipeRating", typeof(string)); _dtSearchResults.Columns.Add("IsPublic", typeof(bool)); _dtSearchResults.Columns.Add("relevance", typeof(float)); if (_oRecipeHits.Length() > 0) { for (int iResultsCount = 0; iResultsCount < _oRecipeHits.Length(); iResultsCount++) { Document _dResultsDoc = _oRecipeHits.Doc(iResultsCount); DataRow _rRecipe = _dtSearchResults.NewRow(); _rRecipe["RecipeID"] = _dResultsDoc.Get("RecipeID"); _rRecipe["RecipeTitle"] = _dResultsDoc.Get("RecipeTitle"); _rRecipe["RecipeDescription"] = _dResultsDoc.Get("RecipeDescription"); _rRecipe["Ingredients"] = _dResultsDoc.Get("Ingredients"); _rRecipe["Course"] = _dResultsDoc.Get("Course"); _rRecipe["Equipment"] = _dResultsDoc.Get("Equipment"); _rRecipe["Holiday"] = _dResultsDoc.Get("Holiday"); _rRecipe["CookTime"] = _dResultsDoc.Get("CookTime"); _rRecipe["SkillLevel"] = _dResultsDoc.Get("SkillLevel"); _rRecipe["Region"] = _dResultsDoc.Get("Region"); _rRecipe["RecipeRating"] = _dResultsDoc.Get("RecipeRating"); _rRecipe["IsPublic"] = LUCENE_BOOL_TRUE.Equals(_dResultsDoc.Get("IsPublic")); _rRecipe["relevance"] = _oRecipeHits.Score(iResultsCount); _dtSearchResults.Rows.Add(_rRecipe); } } Scott Remiger 888 Lumber Exchange Building 10 South Fifth Street Minneapolis, MN 55402 O: 612.238.4951 F: 612.746.4237