Jeff
08/27/2024, 1:50 AMjobDescription
is quite a long field, and requiredSkills
is typically an array of strings of skills, is there a way to improve the performance of this query, as well as consider each and every token
This query seems to require every skill provided to be present, but I'd like to have it return the most token matches to least in the results
{
"indexName": "listings",
"query": "Database Administrator Microsoft SQL Server 2000 Microsoft SQL Server 2005 Microsoft SQL Server 2008 Disaster recovery SQL skills Sybase Oracle DBA Data cleansing Data Warehouse tools Oracle Application Servers SAN NAS XMLDB RAC ASM Instance tuning SQL tuning PHP XHTML CSS JavaScript OEM Diagnostic Tuning Configuration Change Management Packs",
"queryBy": "jobTitle,jobDescription,requiredSkills",
"queryByWeights": "2,1,3",
"prefix": "false,false,true",
"includeFields": [
"*"
],
"page": 1,
"perPage": 25,
"filterBy": "status:!=expired"
}
Jeff
08/27/2024, 2:07 AMKishore Nallan
08/27/2024, 5:27 AMJeff
08/27/2024, 11:49 AMvectoryQuery
is performing very well
const params = {
indexName: 'listings',
query: `${jobTitle} ${skills.map(skill => skill.name).join(' ')} ${summary}`,
queryBy: 'embedding',
vectorQuery: 'embedding:([], k:10000, distance_threshold:1.0)',
...(sortType === 'mostRecent' && { sortBy: 'createdAt:desc' }),
includeFields: ['*'],
page: page.value,
perPage: 10,
filterBy: filters.concat({ status: 'active' }),
}