Last active
June 30, 2020 19:45
-
-
Save HenleyChiu/bc48ab11eaa64cacfa7c7bcae6dc3da8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
We want to support use cases #1-#3 below. #1 is not supported currently. | |
We have a doc in the links index with this value for 'domains': | |
"domains":["DOMAIN_END moremags com DOMAIN_END","blog buzzsumo com DOMAIN_END","chameleonartproducts com DOMAIN_END"] | |
1) User wants to search for all docs that link to any page in chameleonartproducts.com | |
Query generated right now: | |
{:query_string=>{:query=>"\"DOMAIN_END chameleonartproducts com DOMAIN_END\" OR \"DOMAIN_END DOMAIN_END chameleonartproducts com DOMAIN_END\"", :fields=>["domains"], :phrase_slop=>0} | |
This returns 0 results, even though the doc above matches it. It contains "chameleonartproducts com DOMAIN_END" | |
Expected: return 1 result | |
2) User wants to search for all docs that link to any page in blog.buzzsumo.com | |
Query generated right now: | |
{:query_string=>{:query=>"\"blog buzzsumo com DOMAIN_END\" OR \"DOMAIN_END blog buzzsumo com DOMAIN_END\"", :fields=>["domains"], :phrase_slop=>0} | |
This returns 1 result, which matches our expectations. | |
3) User wants to search for all docs that link to any page in www.buzzsumo.com only. | |
Query generated right now: | |
{:query_string=>{:query=>"\"DOMAIN_END buzzsumo com DOMAIN_END\" OR \"DOMAIN_END DOMAIN_END buzzsumo com DOMAIN_END\"", :fields=>["domains"], :phrase_slop=>0} | |
This returns 0 results, which matches our expectations. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment