Skip to content

Commit

Permalink
fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mdavis95 committed Mar 31, 2022
1 parent 8d8f0e5 commit fb4760b
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
import com.google.protobuf.ByteString;
import io.zulia.ZuliaConstants;
import io.zulia.message.ZuliaBase;
import io.zulia.message.ZuliaIndex;
import io.zulia.message.ZuliaIndex.AnalyzerSettings;
import io.zulia.message.ZuliaIndex.FieldConfig;
import io.zulia.message.ZuliaQuery;
import io.zulia.message.ZuliaServiceOuterClass;
import io.zulia.server.analysis.ZuliaPerFieldAnalyzer;
Expand Down Expand Up @@ -372,7 +375,7 @@ private PerFieldSimilarityWrapper getSimilarity(Map<String, ZuliaBase.Similarity
@Override
public org.apache.lucene.search.similarities.Similarity get(String name) {

ZuliaIndex.AnalyzerSettings analyzerSettings = indexConfig.getAnalyzerSettingsForIndexField(name);
AnalyzerSettings analyzerSettings = indexConfig.getAnalyzerSettingsForIndexField(name);
ZuliaBase.Similarity similarity = ZuliaBase.Similarity.BM25;
if (analyzerSettings != null && analyzerSettings.getSimilarity() != null) {
similarity = analyzerSettings.getSimilarity();
Expand Down Expand Up @@ -497,7 +500,7 @@ private TopDocsCollector<?> getSortingCollector(ZuliaQuery.SortRequest sortReque
String rewrittenField = ZuliaParser.rewriteLengthFields(fs.getSortField());

String sortField = fs.getSortField();
ZuliaIndex.FieldConfig.FieldType sortFieldType = indexConfig.getFieldTypeForSortField(sortField);
FieldConfig.FieldType sortFieldType = indexConfig.getFieldTypeForSortField(sortField);

if (ZuliaConstants.SCORE_FIELD.equals(sortField)) {
sortFields.add(new SortField(null, SortField.Type.SCORE, !reverse));
Expand Down Expand Up @@ -693,10 +696,10 @@ private void handleSortValues(ZuliaQuery.SortRequest sortRequest, ScoreDoc score
continue;
}

ZuliaIndex.FieldConfig.FieldType fieldTypeForSortField = indexConfig.getFieldTypeForSortField(sortField);
FieldConfig.FieldType fieldTypeForSortField = indexConfig.getFieldTypeForSortField(sortField);

if (!ZuliaParser.rewriteLengthFields(sortField).equals(sortField)) {
fieldTypeForSortField = ZuliaIndex.FieldConfig.FieldType.NUMERIC_INT;
fieldTypeForSortField = FieldConfig.FieldType.NUMERIC_INT;
}

ZuliaQuery.SortValue.Builder sortValueBuilder = ZuliaQuery.SortValue.newBuilder().setExists(true);
Expand Down

0 comments on commit fb4760b

Please sign in to comment.