lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dallan Quass" <>
Subject Possible to issue queries during analysis?
Date Fri, 30 May 2008 03:01:57 GMT
I apologize for posting to the dev list. I posted this on the users mailing
list but didn't get a response, and I'm really hoping someone here could
give me a pointer.

I have a situation where it would be beneficial to issue queries in a filter
that is called during analysis.  In a nutshell, I have an index of places
that includes possible abbreviations.  And I want to query this index during
analysis to convert user-entered places to "standardized" places.  So if
someone enters "Chicago, IL" into a "place" field, I want to write a filter
that first issues a query on "IL" to find that the standardized name for IL
is Illinois, and then issues a query on places named "Chicago" located in
"Illinois" to find that the standardized name is "Chicago, Cook, Illinois",
and then returns this string in a token.  

I've tried having the filter factory implement SolrCoreAware, but that isn't
allowed for filter factories.  I've considered calling
SolrCore.getSolrCore(), but this function has been deprecated with a comment
that "if you are using multiple cores, this is not a function to use", and
I'd like to use multiple cores someday.  I looked at but
couldn't find a way to get a specific core.  

Any ideas?  I could issue the queries to standardize the place fields in
each document before indexing it, and then send SOLR documents with
pre-standardized place fields, but it would sure be more convenient (and
probably better-performing) to issue the queries during analysis.

I'd appreciate suggestions!



View raw message