You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/06/25 22:54:36 UTC

[GitHub] [lucene-solr] tflobbe opened a new pull request #1616: SOLR-14590: Add RankQParserPlugin

tflobbe opened a new pull request #1616:
URL: https://github.com/apache/lucene-solr/pull/1616


   This is still WIP, just the query parsing so far. Currently working on the indexing side of things.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] vthacker commented on a change in pull request #1616: SOLR-14590: Add RankQParserPlugin

Posted by GitBox <gi...@apache.org>.
vthacker commented on a change in pull request #1616:
URL: https://github.com/apache/lucene-solr/pull/1616#discussion_r446404384



##########
File path: solr/core/src/java/org/apache/solr/schema/RankField.java
##########
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.schema;
+
+import java.io.IOException;
+import java.util.Map;
+
+import org.apache.lucene.document.FeatureField;
+import org.apache.lucene.index.IndexableField;
+import org.apache.lucene.index.IndexableFieldType;
+import org.apache.lucene.search.Query;
+import org.apache.lucene.search.SortField;
+import org.apache.solr.common.SolrException;
+import org.apache.solr.response.TextResponseWriter;
+import org.apache.solr.search.QParser;
+import org.apache.solr.uninverting.UninvertingReader.Type;
+
+public class RankField extends FieldType {
+
+  @Override
+  public Type getUninversionType(SchemaField sf) {
+    throw null;
+  }
+
+  @Override
+  public void write(TextResponseWriter writer, String name, IndexableField f) throws IOException {
+  }
+  
+  @Override
+  protected void init(IndexSchema schema, Map<String,String> args) {
+    super.init(schema, args);
+    properties &= ~(UNINVERTIBLE | STORED | DOC_VALUES);
+    
+  }
+
+  @Override
+  protected IndexableField createField(String name, String val, IndexableFieldType type) {
+    if (val == null || val.isEmpty()) {
+      return null;
+    }
+    String[] parts = val.split(":");

Review comment:
       Chatting with @tflobbe on this - Can we improve the API to not expose `fieldName/fieldValue` pair and just ask the user to enter one input?
   
   For example could we take either of these two approaches
   1. Use an `_internalFeature` field. The `fieldName` that the user defines would be used as the `featureName` in the FeatureField ctor . So internally everything is stored in one field.
   2. Every feature gets is own field - so the user only defines the `fieldName` and we use the same value as the `featureName` 
   
   Approach 2 would definitely lead to lots of fields. But maybe it's worth exploring 1 and seeing if that helps improve the API without trading any performance.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] tflobbe closed pull request #1616: SOLR-14590: Add RankQParserPlugin

Posted by GitBox <gi...@apache.org>.
tflobbe closed pull request #1616:
URL: https://github.com/apache/lucene-solr/pull/1616


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] tflobbe commented on pull request #1616: SOLR-14590: Add RankQParserPlugin

Posted by GitBox <gi...@apache.org>.
tflobbe commented on pull request #1616:
URL: https://github.com/apache/lucene-solr/pull/1616#issuecomment-651255112


   Superseded by https://github.com/apache/lucene-solr/pull/1620


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org