Open marengohue opened 1 year ago
Certain operations are only allowed for certain underlying types and annotation combinations:
.Where(it => it.SomeNumber >= 10)
.Where(it => it.SomeString == "woah")
.Where(it => it.FirstName == it.LastName)
Fields that are marked as simple fields within the index, but are not filterable, should not be valid for regular and referential equality comparisons and should not appear in the SearchQueryBuilder, when trying to build-up LINQ based queries.
Fields that are marked as searchable but not as filterable, should appear in the query builder for the purposes of search, but not for the purposes of filtering. Filtering and searching should be done in separate sections of the query builder. Example:
_searchService.Query()
.Search(it => it.FullTextField.Matches("woah*") /* Only full text queries are allowed */)
.Where(it => /* Only filtering queries are allowed */)
.ToArrayAsync()
Stage 1 of building the lucene query is to analyze the underlying search model and generate an appropriate query builder definition based on properties and their type annotations.
For now we support only primitive types - boolean, int, string and floating point numbers.