Solr how to exclude custom fields from my schema -
my problem simple. have 30 fields in index. several cases want exclude 2 fields schema. won't happening always. based on customer data.
for example if search "test".
i trying add $querysolr:
squerysolr->addparam('fq','available:(1) , (!field1 = '*test*' , !field2 = '*test*');
problem when other active fields match phrase 'test' - there no result. how simple exclude field1 , field2 searching ?
for excluding query, can add -(field1:"*test*" , field2:"*test*")
.
but if never want query on field1 , field2, modify in schema. make indexed="false"
fields.
Comments
Post a Comment