On Thu, Nov 4, 2010 at 8:21 AM, Tommaso Teofili <tommaso.teof...@gmail.com>wrote:
> Hi all, > having two fields named 'type' and 'cat' with identical type and options, > but different values recorded, would it be possible to query them as they > were one field? > For instance > q=type:electronics cat:electronics > should return same results as > q=common:electronics > I know I could make it defining a third field 'common' with copyFields from > 'type' and 'cat' to 'common' but this wouldn't be feasible if you've > already > lots of documents in your index and don't want to reindex everything, isn't > it? > Any suggestions? > Thanks in advance, > Tommaso > Tommaso, If re-indexing is not feasible/preferred, you might try looking into creating a dismax handler that should give you what you're looking for in your query: http://wiki.apache.org/solr/DisMaxQParserPlugin. The same solrconfig.xml that comes with SOLR has a dismax parser that you can modify to your needs. - Ken Stanley