and I want to search by floor name/description and/or building
name/description but omitting the results if the user does not have the
correct security level.
For instance if I try to find "First" and my security_level is 0 I should
not get any hit, but if my security level is 1 or 2 I should get one hit.
Also if I try to find "Store" and my security_level is 0 I should not get
any hit, but if my security level is 1 or 2 I should get one hit.
I've tried using the following query (for a user with security_level equal
to 1) but is does not work because it filters all documents that have one
or more floors.security_level equal to 2, even if there are other
floors.security_level with 0 or 1 that match the other criteria.
Also, note you use things like prefix filter, and that part is not analyzed. So, if you index desc as "First Store", the terms created are "first" and "store" (by the default standard analyzer), which means using prefix filter (or query) with "First" will not match anything.
and I want to search by floor name/description and/or building name/description but omitting the results if the user does not have the correct security level.
For instance if I try to find "First" and my security_level is 0 I should not get any hit, but if my security level is 1 or 2 I should get one hit.
Also if I try to find "Store" and my security_level is 0 I should not get any hit, but if my security level is 1 or 2 I should get one hit.
I've tried using the following query (for a user with security_level equal to 1) but is does not work because it filters all documents that have one or more floors.security_level equal to 2, even if there are other floors.security_level with 0 or 1 that match the other criteria.
Also, note you use things like prefix filter, and that part is not
analyzed. So, if you index desc as "First Store", the terms created are
"first" and "store" (by the default standard analyzer), which means using
prefix filter (or query) with "First" will not match anything.
and I want to search by floor name/description and/or building
name/description but omitting the results if the user does not have the
correct security level.
For instance if I try to find "First" and my security_level is 0 I should
not get any hit, but if my security level is 1 or 2 I should get one hit.
Also if I try to find "Store" and my security_level is 0 I should not get
any hit, but if my security level is 1 or 2 I should get one hit.
I've tried using the following query (for a user with security_level equal
to 1) but is does not work because it filters all documents that have one
or more floors.security_level equal to 2, even if there are other
floors.security_level with 0 or 1 that match the other criteria.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.