Comments (12)
Fixed in #156
from silverstripe-fulltextsearch.
wow - good job figuring this out!
from silverstripe-fulltextsearch.
Hey @tractorcow or @chillu - do you have any context to provide here?
from silverstripe-fulltextsearch.
Can you check that you've run through all the steps in https://www.cwp.govt.nz/developer-docs/en/1.7/features/solr_search/tuning_the_search_results/#search-term-synonyms-2?
Does your index extend SolrSearchIndex?
from silverstripe-fulltextsearch.
from silverstripe-fulltextsearch.
Hey @tractorcow,
I can confirm that everything is set up as expected. I am able to make changes within the CMS to the synonyms config and see them reflected in the synonyms. txt
file that is generated in .solr
.
The custom index extends CwpSearchIndex
, which I can see contains the relevant synonyms code. However, it does not extend SolrSearchIndex
(which is itself an extension of CwpSearchIndex
in this case).
I have also been able to replicate this by swapping out the custom index and using the SolrSearchIndex
directly instead.
-Glen
from silverstripe-fulltextsearch.
Ok, the fact that synonyms.txt exists in that folder is a good sign; The issue is in the solr configuration, not in your code.
Next step is to debug the XML that solr is using... which requires a bit of docs reading and understanding to debug.
from silverstripe-fulltextsearch.
gdp, jel, knp
Could it be a min-character for synonyms isn't being met? Check that setting first. :)
from silverstripe-fulltextsearch.
I have done a fresh CWP 1.7.0 install to eliminate any further variables. I've created three pages with their page name, navigation label and content as "tortoise", "kangaroo", and "stingray". This uses the standard SolrSearchIndex.
When I search for these terms without synonyms, the relevant individual pages are returned as expected.
However, when I add synonyms to the config (and run Solr_Configure
to see them reflected in the synonyms.txt
) no search results appear for any of those words now. Instead I get Sorry, your search query did not return any results.
from silverstripe-fulltextsearch.
However, when I add synonyms to the config (and run Solr_Configure to see them reflected in the synonyms.txt) no search results appear for any of those words now. Instead I get Sorry, your search query did not return any results.
Depending on your config you will ALSO need to run Solr_Reindex. Synonyms can be configured either against the query, or against the source dataset; The latter will require a re-index for it to activate.
from silverstripe-fulltextsearch.
Hi Damian,
I have run Solr_Reindex. I usually do just in case. I'm using a standard CWP 1.7.0 installation and am getting no results.
You might be onto something however. Maybe the instructions for setting up synonyms or the implementation of synonyms with the CwpSearchIndex don't go far enough to actually implement query time synonym use. From the CWP set up instructions it says It's not necessary to run Solr_Reindex in order for changes in synonyms to take effect.
, meaning that it must be designed to use synonyms at query time, although perhaps that is not actually implemented. Do you know where in cwp, cwp-core, or fulltextsearch that it is actually set up to use synonyms at query time or is does SOLR simply do this itself when synonyms.txt is present?
from silverstripe-fulltextsearch.
Do you know where in cwp, cwp-core, or fulltextsearch that it is actually set up to use synonyms at query time or is does SOLR simply do this itself when synonyms.txt is present?
Here is the query config that declares query-time synonym interpolation.
It looks like this is uploaded directly to CWP, so you could possibly force it to index-time if you wanted to.
from silverstripe-fulltextsearch.
Related Issues (20)
- Filters are not escaped HOT 2
- Variant state not reset during processing. HOT 3
- Results not showing after editing pages (no soft-commit nor core reload issued) HOT 10
- Test and merge "allow update processor to be overridden by existing yml"
- Works fine on Dev, but on Prod many index files are missing and all owned by root (same database)
- Solr now at version 8 HOT 1
- Migrate to new Symfony cache classes HOT 5
- `SearchableService::isSearchable` incorrectly assumes return type of `canView` HOT 2
- Solr_Reindex build task doesn't work in dev mode in 3.9.0 HOT 4
- Allowing Symfony 3.2 or 4 can break reindexing HOT 10
- Stage param not being passed to Symfony
- 4.11.0-beta1 PHP 8.1 - Deprecation issue in solr-php-client HOT 1
- 4.11.0-beta2 PHP 8.1 - Changes in content are not reflected in search results HOT 7
- SearchIndex::fieldData is inefficient
- RFC: Search index update/new searcher on auto commit HOT 10
- 4.12 regression: Elemental block content not showing on search summary HOT 8
- `SearchVariant` replaced by `Injector` not consistent when used as part of `_documentid` HOT 1
- Deprecated code PHP 8.2 HOT 2
- New model field added to index, but doesn't appear in Solr HOT 1
- Add belongs_many_many support to search field scaffolding HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from silverstripe-fulltextsearch.