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

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -