|
I've been looking the code and the test but i still don't undertands some things.
1 - // creating a browse request
BrowseRequest browseRequest = new BrowseRequest();
browseRequest.Count = 10;
browseRequest.Offset = 0;
browseRequest.FetchStoredFields = true;
If I want to search in all my index, what value i should set on Count?
2 - With Lucene, in all my search i was doing this:
BooleanQuery bq = new BooleanQuery();
Query qf = new TermQuery(new Lucene.Net.Index.Term("IDCity", "24"));
bq.Add(qf, BooleanClause.Occur.MUST);
This is replaced with this, isn´t ?
// add a selection
BrowseSelection sel = new BrowseSelection("IDCity");
sel.addValue("24");
browseRequest.AddSelection(sel);
3 - When i create my index, i need to considerer something additional when i'm adding documents?
Maybe IDCity and CityName?
This is my current index:
Document.Add(new Field("IDDoc", reader.GetInt32(0).ToString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
document.Add(new Field("IDOperation", reader.GetInt32(1).ToString(), Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("IDType", reader.GetInt32(2).ToString(), Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("IDState", reader.GetInt32(6).ToString(), Field.Store.YES, Field.Index.ANALYZED));
document.Add(new Field("IDCity", reader[7].ToString() != string.Empty ? reader.GetInt32(7).ToString() : "-1", Field.Store.YES, Field.Index.ANALYZED));
Thanks a lot!
|