diff options
author | Armaan Danewalia <adanewalia@google.com> | 2022-12-14 23:11:56 +0000 |
---|---|---|
committer | Armaan Danewalia <adanewalia@google.com> | 2022-12-14 23:17:26 +0000 |
commit | a16335a6d29f1ddbbc76361b37633cd7a5ec0f35 (patch) | |
tree | 2812446123e8a585876ca558f49bfeeac2f89b50 /proto | |
parent | a2126a6b3e24de0f6e3ffb9230ce30b6ff6b5658 (diff) | |
parent | f99fc8b1d3c6bf6f8dc3a121775b5fbd454f4eb4 (diff) | |
download | icing-a16335a6d29f1ddbbc76361b37633cd7a5ec0f35.tar.gz |
Merge remote-tracking branch 'goog/androidx-platform-dev'
* goog/androidx-platform-dev:
Sync from upstream.
Descriptions:
======================================================================
Add ScoringSpec into JoinSpec. Rename joined_document to child_document.
======================================================================
Create JoinedScoredDocumentHit class and refactor ScoredDocumentHitsRanker.
======================================================================
Implement initial Join workflow
======================================================================
Implement the Lexer for Icing Advanced Query Language
======================================================================
Create struct Options for PersistentHashMap
======================================================================
Premapping FileBackedVector
======================================================================
Create class PersistentHashMapKeyMapper
======================================================================
Add integer sections into TokenizedDocument and rename string sections
======================================================================
Create NumericIndex interface and DocHitInfoIteratorNumeric
======================================================================
Implement DummyNumericIndex and unit test
======================================================================
Change PostingListAccessor::Finalize to rvalue member function
======================================================================
Define the Abstract Syntax Tree for Icing's list_filter parser.
======================================================================
Refactor query processing and score
======================================================================
Refactor IcingSearchEngine for AppSearch Dynamite Module 0p APIs
======================================================================
Implement the Lexer for Icing Advanced Scoring Language
======================================================================
Add a common interface for IcingSearchEngine and dynamite client
======================================================================
Implement a subset of the query grammar.
======================================================================
Refactor index processor
======================================================================
Add integer index into IcingSearchEngine and IndexProcessor
======================================================================
Implement the parser for Icing Advanced Scoring Language
======================================================================
Implement IntegerIndexData and PostingListUsedIntegerIndexDataSerializer
======================================================================
Add PostingListAccessor abstract class for common components and methods
======================================================================
Implement PostingListIntegerIndexDataAccessor
======================================================================
Create PostingListIntegerIndexDataAccessorTest
======================================================================
Fix Icing Segmentation tests for word connectors that changed in ICU 72.
======================================================================
Modify the Advanced Query grammar to allow functions to accept expressions.
======================================================================
Implement QueryVisitor.
======================================================================
Enable the Advanced Query Parser to handle member functions
======================================================================
Refactor the Scorer class to support the Advanced Scoring Language
======================================================================
Integrate advanced query parser with the query processor.
======================================================================
Implement support for JoinSpec in Icing.
======================================================================
Implement the Advanced Scoring Language for basic functions and operators
======================================================================
Bug: 208654892
Bug: 249829533
Bug: 256022027
Bug: 261474063
Bug: 240333360
Bug: 193919210
Change-Id: Iffcbff7daa4a519e97e03c3c62dfa5e09524491e
Diffstat (limited to 'proto')
-rw-r--r-- | proto/icing/proto/scoring.proto | 9 | ||||
-rw-r--r-- | proto/icing/proto/search.proto | 44 |
2 files changed, 38 insertions, 15 deletions
diff --git a/proto/icing/proto/scoring.proto b/proto/icing/proto/scoring.proto index 13861c9..a8040a1 100644 --- a/proto/icing/proto/scoring.proto +++ b/proto/icing/proto/scoring.proto @@ -25,7 +25,7 @@ option objc_class_prefix = "ICNG"; // Encapsulates the configurations on how Icing should score and rank the search // results. // TODO(b/170347684): Change all timestamps to seconds. -// Next tag: 4 +// Next tag: 12 message ScoringSpecProto { // OPTIONAL: Indicates how the search results will be ranked. message RankingStrategy { @@ -71,6 +71,9 @@ message ScoringSpecProto { // Ranked by the aggregated score of the joined documents. JOIN_AGGREGATE_SCORE = 10; + + // Ranked by the advanced scoring expression provided. + ADVANCED_SCORING_EXPRESSION = 11; } } optional RankingStrategy.Code rank_by = 1; @@ -99,6 +102,10 @@ message ScoringSpecProto { // all properties that are not specified are given a raw, pre-normalized // weight of 1.0 when scoring. repeated TypePropertyWeights type_property_weights = 3; + + // OPTIONAL: Specifies the scoring expression for ADVANCED_SCORING_EXPRESSION + // RankingStrategy. + optional string advanced_scoring_expression = 4; } // Next tag: 3 diff --git a/proto/icing/proto/search.proto b/proto/icing/proto/search.proto index 181c63c..e7e0208 100644 --- a/proto/icing/proto/search.proto +++ b/proto/icing/proto/search.proto @@ -299,7 +299,7 @@ message SearchResultProto { // determined by ScoringSpecProto.rank_by. optional double score = 3; - // The documents that were joined to a parent document. + // The child documents that were joined to a parent document. repeated ResultProto joined_results = 4; } repeated ResultProto results = 2; @@ -430,37 +430,53 @@ message SuggestionResponse { // // Next tag: 7 message JoinSpecProto { - // A nested SearchSpec that will be used to retrieve joined documents. If you - // are only looking to join on Action type documents, you could set a schema - // filter in this SearchSpec. This includes the nested search query. See - // SearchSpecProto. - optional SearchSpecProto nested_search_spec = 1; + // Collection of several specs that will be used for searching and joining + // child documents. + // + // Next tag: 4 + message NestedSpecProto { + // A nested SearchSpec that will be used to retrieve child documents. If you + // are only looking to join on a specific type documents, you could set a + // schema filter in this SearchSpec. This includes the nested search query. + // See SearchSpecProto. + optional SearchSpecProto search_spec = 1; + + // A nested ScoringSpec that will be used to score child documents. + // See ScoringSpecProto. + optional ScoringSpecProto scoring_spec = 2; + + // A nested ResultSpec that will be used to format child documents in the + // result joined documents, e.g. snippeting, projection. + // See ResultSpecProto. + optional ResultSpecProto result_spec = 3; + } + optional NestedSpecProto nested_spec = 1; // The equivalent of a primary key in SQL. This is an expression that will be // used to match child documents from the nested search to this document. One - // such expression is qualifiedId(). When used, it means the - // child_property_expression in the joined documents must be equal to the - // qualified id. + // such expression is qualifiedId(). When used, it means the contents of + // child_property_expression property in the child documents must be equal to + // the qualified id. // TODO(b/256022027) allow for parent_property_expression to be any property // of the parent document. optional string parent_property_expression = 2; // The equivalent of a foreign key in SQL. This defines an equality constraint // between a property in a child document and a property in the parent - // document. For example, if you want to join Action documents which an + // document. For example, if you want to join child documents which an // entityId property containing a fully qualified document id, // child_property_expression can be set to "entityId". // TODO(b/256022027) figure out how to allow this to refer to documents // outside of same pkg+db+ns. optional string child_property_expression = 3; - // The max amount of joined documents to join to a parent document. - optional int32 max_joined_result_count = 4; + // The max number of child documents to join to a parent document. + optional int32 max_joined_child_count = 4; - // The strategy by which to score the aggregation of joined documents. For + // The strategy by which to score the aggregation of child documents. For // example, you might want to know which entity document has the most actions // taken on it. If JOIN_AGGREGATE_SCORE is used in the base SearchSpecProto, - // the COUNT value will rank entity documents based on the number of joined + // the COUNT value will rank entity documents based on the number of child // documents. enum AggregationScore { UNDEFINED = 0; |