Skip to content

Commit

Permalink
Added filter to exclude content chunks from API query, for #99 Implem…
Browse files Browse the repository at this point in the history
…ent vector search
  • Loading branch information
m-i-l committed Jul 8, 2023
1 parent 231c2a4 commit 09c9398
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/web/content/dynamic/searchmysite/solr.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@
random_result_step3_get_doc_from_domain = 'select?q=*%3A*&rows=1&start={}&fq=domain%3A{}' + query_filter_content_type

# 5. API query
solrquery = 'select?fl=id,url,title,author,description,tags,page_type,page_last_modified,published_date,language,indexed_inlinks,indexed_outlinks&q={}&start={}&rows={}&wt=json&fq=domain%3A{}&hl=on&hl.fl=content&hl.simple.pre={}&hl.simple.post={}'
# &fq=!relationship%3Achild added to ensure only parent pages are returned, i.e. not the content chunks used for embedding
# (can't use fq=relationship%3Aparent because not all pages will have a value for relationship initially)
solrquery = 'select?fl=id,url,title,author,description,tags,page_type,page_last_modified,published_date,language,indexed_inlinks,indexed_outlinks&q={}&start={}&rows={}&wt=json&fq=domain%3A{}&fq=!relationship%3Achild&hl=on&hl.fl=content&hl.simple.pre={}&hl.simple.post={}'


# Solr update queries
Expand Down

0 comments on commit 09c9398

Please sign in to comment.