[TYPO3-Solr] Some Questions to solr

Jigal van Hemert jigal.van.hemert at typo3.org
Fri Jun 7 14:43:55 CEST 2013


Hi,

On 7-6-2013 9:49, Stefan Kruse wrote:
> I use solr to indexing my extension datas. This works great. Now I build me
> a autocomplete/suggest eid script, that works too. But with some troubles. I
> have words like Festmacher, Festmacher - Bremen, Festmacher - Hamburg etc.
> When I enter Festmacher then all entries are shown but when I make a
> whitespace after FEstmacher than nothing is shown. Why is this so? It would
> be nice that when I enter Festmacher Bremen that then the entrty Festmacher
> - Bremen are shown. Is there a way to do this?

For most purposes it's logical that spaces are meant to separate words.
You might look into the CommonGramsFilterFactory which can re-combine 
combinations with words from a list and add them as terms in the index.
This requires you to set up extra field configurations on the server, 
which is only advisable if you know what you're doing.

> And how about datas in different languages? How does this works? When I some
> datas in 2 languages , are they stored in the same solr index or in 2
> diffents?

It's better to use a different core for each language. In EXT:solr there 
are already core definitions for many languages. Each has configuration 
that fits the way words are formed in those languages.
You can upload the cores you need to the solr server and edit solr.xml 
on the server to let solr know which cores are located where (restart 
tomcat after editing that file).
In TypoScript you usually have conditions for each L-parameter value and 
configuration for the language connected with that value. In that 
configuration you can also set which solr core to use for each language.

> And last but not least: When I make changes to datas in typo3 backend, I
> have to wait for the scheduler that the changed data is loaded to the solr
> indexer. Is there a way (maybe a hook) that when I update a data the item
> was send immidiatly send to solr index?

Solr has hooks to add the changed data to the indexing queue. If you run 
the scheduler task often it only takes very little time before the 
changes are in the index.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-solr mailing list