1
votes

Compare two columns in solr if two fields are equal display true or else false.

CASE WHEN o_is_follow = o_follow_id THEN 'TRUE' ELSE 'FALSE'.

2
where do you it to be compared...while indexing or while searching?Abhijit Bashetti
while searching...user2707767

2 Answers

0
votes

As per as I know comparing one field to another within a document is not supported in either Solr.

I think it can be achieved by one option of creating another field while indexing only.

You can have another field (boolean). Make this field as boolean type and can be used while searching. Create a o_is_follow_present field and set it to true for documents matching it while indexing.

Use the same field as one of your filter criteria..

0
votes

{!frange l=1 u=1}strdist(o_is_follow, o_follow_id,edit) For 100% similarity between o_is_follow and o_follow_id.

{!frange l=0 u=0.999}strdist(o_is_follow, o_follow_id,edit) For maximum 99.9% of similarity between o_is_follow and o_follow_id.