lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Moises <moi...@shoptimax.de>
Subject Re: Tree Faceting in Solr 1.4
Date Sat, 24 Jul 2010 14:03:57 GMT
Hi Jonathan,

I too am using IDs instead of names, one reason being that URLs are 
easier to read and they are more safe, because special chars in names 
could break the URLs etc.
I am keeping the id-to-name lookups in SOLR though, I just use some 
"lookup fields" where I put id and name into one field, separated by 
some fixed delimiter, e.g.
"134982__Some name I am going to lookup later"
The separator here would be two underscores ("__").
So I can query for that lookup field, extract id and name and store them 
into an array or something to loop them up in my (PHP) frontend.
If you don't have too many different values you could also map 
id-to-name in a simple text file (as suggested in the SOLR book e.g.)

Cheers,
Stefan


>> Perhaps completely unnessecery when you have a controlled domain, but I
>> meant to use ids for places instead of names, because names will quickly
>> become ambiguous, e.g.: there are numerous different places over the world
>> called washington, etc.
>>      
> This is related to something I've been thinking about. Okay, say you use ID's instead
of names. Now, you've got to translate those ID's to names before you display them, of course.
>
> One way to do that would be to keep the id-to-name lookup in some non-solr store (rdbms,
or non-sql store)
>
> Is that what you'd do? Is there any non-crazy way to do that without an external store,
just with solr?  Any way to do it with term payloads? Anything else?
>
> Jonathan
>    

-- 
*******************************************
Stefan Moises
Senior Softwareentwickler

shoptimax GmbH
Guntherstraße 45 a
90461 Nürnberg
Amtsgericht Nürnberg HRB 21703
GF Friedrich Schreieck

Tel.: 0911/25566-25
Fax:  0911/25566-29
moises@shoptimax.de
http://www.shoptimax.de
*******************************************


Mime
View raw message