Skip to content

Commit

Permalink
Added Solr adaptor
Browse files Browse the repository at this point in the history
  • Loading branch information
elucidan authored and cardinal252 committed Mar 27, 2022
1 parent e5409e4 commit a073091
Show file tree
Hide file tree
Showing 26 changed files with 1,530 additions and 2,347 deletions.
10 changes: 10 additions & 0 deletions Lucinq.Lucene30/Adapters/LuceneAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,22 @@ protected virtual void Visit(LucinqQuery query, BooleanQuery booleanQuery = null
{
VisitLongRange(longQuery, booleanQuery);
}
else if (query is LucinqRangeQuery<float> floatQuery)
{
VisitFloatRange(floatQuery, booleanQuery);
}
else if (query is LucinqRangeQuery<string> termRangeQuery)
{
VisitTermRange(termRangeQuery, booleanQuery);
}
}

private void VisitFloatRange(LucinqRangeQuery<float> query, BooleanQuery booleanQuery)
{
NumericRangeQuery<float> nativeQuery = NumericRangeQuery.NewFloatRange(query.Field, query.PrecisionStep ?? 1, query.Lower, query.Upper, query.IncludeMin, query.IncludeMax);
AddQuery(query, booleanQuery, nativeQuery);
}

protected virtual void VisitTermRange(LucinqRangeQuery<string> query, BooleanQuery booleanQuery)
{
TermRangeQuery nativeQuery = new TermRangeQuery(query.Field, query.Lower, query.Upper, query.IncludeMin, query.IncludeMax);
Expand Down
Loading

0 comments on commit a073091

Please sign in to comment.