-
Notifications
You must be signed in to change notification settings - Fork 24
fix: search index spec #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
28d890a
3f886b8
bd1e42a
9d27bac
c9655ff
62cb614
0cdb5d4
2bff505
2d131d3
991a9e5
454f180
141db69
649c07c
a094d18
878d999
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ALGOLIA_APPLICATION_ID="" | ||
ALGOLIA_ADMIN_KEY="" | ||
ALGOLIA_SEARCH_KEY="" | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
taskID: | ||
type: integer | ||
description: taskID of the indexing task to wait for. | ||
|
||
objectID: | ||
type: string | ||
description: Unique identifier of the object | ||
|
||
objectIDs: | ||
type: array | ||
items: | ||
type: string | ||
description: List of objectID | ||
|
||
queryID: | ||
type: string | ||
pattern: '^[a-f0-9]{32}$' | ||
example: 43b15df305339e827f0ac0bdc5ebcaa7 | ||
|
||
abTestID: | ||
type: integer | ||
description: If a search encounters an index that is being A/B tested, abTestID reports the ongoing A/B test ID. | ||
|
||
abTestVariantID: | ||
type: integer | ||
description: If a search encounters an index that is being A/B tested, abTestVariantID reports the variant ID of the index used. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
allowCompressionOfIntegerArray: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since we already have |
||
type: boolean | ||
description: Enables compression of large integer arrays. | ||
default: false | ||
|
||
attributeForDistinct: | ||
type: string | ||
description: Name of the de-duplication attribute to be used with the distinct feature. | ||
default: null | ||
|
||
attributesToTransliterate: | ||
type: array | ||
items: | ||
type: string | ||
description: Specify on which attributes to apply transliteration. | ||
|
||
camelCaseAttributes: | ||
type: array | ||
items: | ||
type: string | ||
description: List of attributes on which to do a decomposition of camel case words. | ||
default: [] | ||
|
||
customNormalization: | ||
type: object | ||
additionalProperties: true | ||
description: Override the default normalization handled by the engine. | ||
default: {} | ||
|
||
decompoundedAttributes: | ||
type: object | ||
additionalProperties: true | ||
description: Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding. | ||
default: {} | ||
|
||
disablePrefixOnAttributes: | ||
type: array | ||
items: | ||
type: string | ||
description: List of attributes on which you want to disable prefix matching. | ||
default: [] | ||
|
||
disableTypoToleranceOnWords: | ||
type: array | ||
items: | ||
type: string | ||
description: A list of words for which you want to turn off typo tolerance. | ||
default: [] | ||
|
||
filterPromotes: | ||
type: boolean | ||
description: Whether promoted results should match the filters of the current search, except for geographic filters. | ||
default: false | ||
|
||
indexLanguages: | ||
type: array | ||
items: | ||
type: string | ||
description: Sets the languages at the index level for language-specific processing such as tokenization and normalization. | ||
default: [] | ||
|
||
numericAttributesForFiltering: | ||
type: array | ||
items: | ||
type: string | ||
description: List of numeric attributes that can be used as numerical filters. | ||
default: null | ||
|
||
paginationLimitedTo: | ||
type: integer | ||
description: Set the maximum number of hits accessible via pagination. | ||
default: 1000 | ||
|
||
userData: | ||
type: object | ||
additionalProperties: true | ||
description: Lets you store custom data in your indices. | ||
default: {} | ||
|
||
replicas: | ||
type: array | ||
items: | ||
type: string | ||
description: Creates replicas, exact copies of an index. | ||
default: [] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
record: | ||
type: object | ||
description: A single record | ||
additionalProperties: true | ||
required: | ||
- objectID | ||
properties: | ||
objectID: | ||
$ref: '../responses/common.yml#/objectID' | ||
_highlightResult: | ||
$ref: '#/highlightResult' | ||
_snippetResult: | ||
$ref: '#/snippetResult' | ||
_rankingInfo: | ||
$ref: '#/rankingInfo' | ||
_distinctSeqID: | ||
type: number | ||
Comment on lines
+10
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note, we should investigate if we can influence this response object with request param. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. True, it was implemented as all optional for now but we should indeed make it clearer. Should we consider it in this PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no but we can note it in next investigation |
||
|
||
# Props | ||
highlightResult: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
value: | ||
type: string | ||
description: 'Markup text with occurrences highlighted.' | ||
example: '<em>George</em> <em>Clo</em>oney' | ||
matchLevel: | ||
type: string | ||
description: 'Indicates how well the attribute matched the search query.' | ||
enum: [none, partial, full] | ||
matchedWords: | ||
type: array | ||
description: List of words from the query that matched the object. | ||
items: | ||
type: string | ||
fullyHighlighted: | ||
type: boolean | ||
description: 'Whether the entire attribute value is highlighted.' | ||
|
||
snippetResult: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
value: | ||
type: string | ||
description: 'Markup text with occurrences highlighted.' | ||
example: '<em>George</em> <em>Clo</em>oney...' | ||
matchLevel: | ||
type: string | ||
description: 'Indicates how well the attribute matched the search query.' | ||
enum: [none, partial, full] | ||
|
||
rankingInfo: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
filters: | ||
type: integer | ||
description: 'This field is reserved for advanced usage.' | ||
firstMatchedWord: | ||
type: integer | ||
description: 'Position of the most important matched attribute in the attributes to index list.' | ||
geoDistance: | ||
type: integer | ||
description: 'Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).' | ||
geoPrecision: | ||
type: integer | ||
description: 'Precision used when computing the geo distance, in meters.' | ||
matchedGeoLocation: | ||
type: object | ||
additionalProperties: | ||
type: object | ||
additionalProperties: false | ||
properties: | ||
lat: | ||
type: float | ||
description: 'Latitude of the matched location.' | ||
lng: | ||
type: float | ||
description: 'Longitude of the matched location.' | ||
distance: | ||
type: integer | ||
description: 'Distance between the matched location and the search location (in meters).' | ||
nbExactWords: | ||
type: integer | ||
description: 'Number of exactly matched words.' | ||
nbTypos: | ||
type: integer | ||
description: 'Number of typos encountered when matching the record.' | ||
promoted: | ||
type: boolean | ||
description: 'Present and set to true if a Rule promoted the hit.' | ||
proximityDistance: | ||
type: integer | ||
description: 'When the query contains more than one word, the sum of the distances between matched words (in meters).' | ||
userScore: | ||
type: integer | ||
description: 'Custom ranking for the object, expressed as a single integer value.' | ||
word: | ||
type: integer | ||
description: 'Number of matched words, including prefixes and typos.' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Not used yet | ||
|
||
# timeouts: | ||
# type: object | ||
# additionalProperties: false | ||
# properties: | ||
# connect: | ||
# type: integer | ||
# description: 'Connection timeout in seconds.' | ||
# example: 2 | ||
# read: | ||
# type: integer | ||
# description: 'Read timeout in seconds.' | ||
# example: 5 | ||
# write: | ||
# type: integer | ||
# description: 'Write timeout in seconds.' | ||
# example: 30 | ||
|
||
# X-Algolia-UserToken: | ||
# type: string | ||
# X-Forwarded-For: | ||
# type: string |
Uh oh!
There was an error while loading. Please reload this page.