Skip to content

Commit

Permalink
Fine tune semantic search
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonbosco committed Oct 19, 2023
1 parent 6ebeb13 commit 1351a2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,17 @@ <h1 class="text-secondary mb-1">
<div class="col-md">
Try:
<span id="example-search-terms">
<a role="button" class="clickable-search-term">COVID</a>,
<a role="button" class="clickable-search-term">eclipse</a>,
<a role="button" class="clickable-search-term">online</a>,
<a role="button" class="clickable-search-term">duty</a>,
<a role="button" class="clickable-search-term">mars</a>,
<a role="button" class="clickable-search-term">captcha</a>,
<a role="button" class="clickable-search-term">noise</a>,
<a role="button" class="clickable-search-term">cheese</a>,
<a role="button" class="clickable-search-term">floppy</a>,
<a role="button" class="clickable-search-term">stupid</a>,
<a role="button" class="clickable-search-term">urgent</a>,
<a role="button" class="clickable-search-term">bug</a>,
<a role="button" class="clickable-search-term">error</a>
<a role="button" class="clickable-search-term">gravity</a>
</span>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ const typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
query_by_weights: '127,80,80,1,1',
num_typos: 1,
exclude_fields: 'embedding',
vector_query: 'embedding:([], k: 30, distance_threshold: 0.1, alpha: 0.9)',
// prefix: false
},
});
Expand Down Expand Up @@ -271,7 +272,7 @@ search.addWidgets([
items: [
{
label: 'relevancy',
value: INDEX_NAME,
value: `${INDEX_NAME}/sort/_text_match(buckets: 10):desc,publishDateTimestamp:desc`,
},
{
label: 'recent first',
Expand Down

0 comments on commit 1351a2c

Please sign in to comment.