database - How to return column that matched the query in Solr..? -


i using apache solr searching database..!!

suppose have indexed 4 columns 1 of table..!!..i want columns that contains query term returned in response..!!..is possible..??

for example :

i have table cars columns : name, displayname, description, extra ..!!

now make query , :

localhost:8983/solr/select?q=maruti&wt=json 

now in rows name may contain word "maruti"

so, in return, want name (along other fixed fields id) ..

similarly, if description contains word, description should returned..and not other columns..!!

how can acheive this..??

you may able solr 4 , custom transformer - reading of documentation seem indicate much. quite bit of work, think. may have write front-end filter, difficult complex queries.

update: here's how in solr without custom transformers, etc. enable highlighting 4 columns:

hl=on&hl.fl=name,displayname,description,extra 

solr return "highlighting" structure containing key , field(s) match query. highlighted snippets, whether use them you. see here additional params: http://wiki.apache.org/solr/highlightingparameters


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -