Open paratoner opened 8 years ago
It's not a good explanation, but the reason is mainly that we abandoned the idea of having a Search method that takes a JObject in favor for the regular ones.
The logic was that you could construct a search in a similar language as what your documents was written in, but in the end it was far more simple to use index.Search(string query).
This has left a big chunk of the framework in a bit of a limbo.
Instead of changing the code, you can replace services.
You can use:
var index = new LuceneStorageIndex(factory: new MyCustomServiceFactory());
class MyCustomServiceFactory : DefaultServiceFactory {
public override ILuceneSearcher CreateSearcher(IStorageIndex index) {
return new LuceneSearcher(index, new MyQueryBuilder());
}
}
But these are services that is very much in flux at this time :(
The idea of allowing services to be replaced will remain though.
Hi again, When i use
ISearchResult Search(JObject query, string contentType = "")
method index configuration Field Strategy is :DotJEM.Json.Index.Configuration.FieldStrategies.FieldStrategy
but when i useISearchResult Search(Query query)
method the Field Strategy is :DotJEM.Json.Index.Configuration.FieldStrategies.TermFieldStrategy
can you explain why this reason? Because it occur problem for me. For example :
it returns result. but i have not a person that named "Lill". it is name is Lilly. this method adds wildcardquery due to the FieldStrategy
but when i use
it returns 0 result and it is correct.
i dont want to change your source code . So can you give me a trick for this problem? sorry about my english. Thanks.