With the "apache solr search module" you could add synonyms into the synonyms.txt that solr ships with.
So when you search for "old" or "aged" you get the same results with both.

Comments

drunken monkey’s picture

Project: Search API » Search API Solr
Version: 7.x-1.0-beta9 » 7.x-1.x-dev
Component: Plugins » Code

Yes, you can do that.
If you are asking to put a default synonyms.txt into the module file: I don't think that will happen. I try to keep this more or less generic, so a stopwords file just suited for English sites (and also maybe for just a certain type of sites) wouldn't be appropriate here.

marcoka’s picture

no i am not asking to put a synonyms file in the module. i am asking if search api uses the synonyms.txt in the solr config dir /solr/drupal/solr/config

drunken monkey’s picture

No, it doesn't. For that to work you'll have to remove the comments around the two solr.SynonymFilterFactory filter definitions in the "text" type.
However, when we don't ship with synonyms (same for stopwords, …) I really think we should leave that commented out. People will have to customize to some degree anyways, and when they want to use such advanced features they should know how to handle this. We could include additional comments in the schema.xml explaining this, though. Or maybe others will show up in favor of this and we'll include the filters after all. Don't know exactly how much of a performance loss this would be for people not using synonyms/stopwords.

marcoka’s picture

i think as always i dont clearly describe. i am able to configure solr and know about various options in the xml.

Stuff like this:

<filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="false"/>

http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.Synonym...

What i meant to ask is if, if i configure that synonym stuff right, will search api handle it correctly. I know that it only routs through solr and it should work, but wanted to ask instead of guessing :)

drunken monkey’s picture

Category: feature » support
Status: Active » Fixed

Ah, OK, thanks for clarifying!
Yes, everything should work fine, even highlighting. Otherwise, please file a bug report.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.