Hi, I have an index with documents which contain a "companyid" and some
other text fields. The companyid refers to our clients' id number. So in
our application when presenting results to each client we need to construct
our search to include both the criteria they enter AND their clientid
number so that we're only showing them their records. We also have
highlighting turned on. The issue is that if the client id is "1", the
number 1 gets highlighted in the snippets along with the other valid
keywords.
So, is there a way to exclude a term from highlighting? Or, is our approach
even the best way? We're using couchdb river to index a single couchdb
database and it's working well. I'd rather not get into having a db/index
for each client...
Hi, I have an index with documents which contain a "companyid" and some other text fields. The companyid refers to our clients' id number. So in our application when presenting results to each client we need to construct our search to include both the criteria they enter AND their clientid number so that we're only showing them their records. We also have highlighting turned on. The issue is that if the client id is "1", the number 1 gets highlighted in the snippets along with the other valid keywords.
So, is there a way to exclude a term from highlighting? Or, is our approach even the best way? We're using couchdb river to index a single couchdb database and it's working well. I'd rather not get into having a db/index for each client...
But, the alias idea sounds like it might be the right track, in tandem with
routing. But I'm trying to figure out if/how that would work. From what
I've digested thus far I think the following might work:
One large index with 50-100 shards
setup a mapping with the _routing field and set the path to our companyid
field
create an alias for each company and set the routing value to the
companyid and also set the filter to the appropriate companyid
Any input/feedback is much appreciated!
On Friday, August 17, 2012 11:08:24 AM UTC-5, David Pilato wrote:
I strongly think that it's better to isolate clients by index. There is no
additional cost in term of storage or performance.
David
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
Le 17 août 2012 à 17:06, Beau Keogh <beau...@gmail.com <javascript:>> a
écrit :
Hi, I have an index with documents which contain a "companyid" and some
other text fields. The companyid refers to our clients' id number. So in
our application when presenting results to each client we need to construct
our search to include both the criteria they enter AND their clientid
number so that we're only showing them their records. We also have
highlighting turned on. The issue is that if the client id is "1", the
number 1 gets highlighted in the snippets along with the other valid
keywords.
So, is there a way to exclude a term from highlighting? Or, is our
approach even the best way? We're using couchdb river to index a single
couchdb database and it's working well. I'd rather not get into having a
db/index for each client...
On Fri, 2012-08-17 at 08:06 -0700, Beau Keogh wrote:
Hi, I have an index with documents which contain a "companyid" and
some other text fields. The companyid refers to our clients' id
number. So in our application when presenting results to each client
we need to construct our search to include both the criteria they
enter AND their clientid number so that we're only showing them their
records. We also have highlighting turned on. The issue is that if the
client id is "1", the number 1 gets highlighted in the snippets along
with the other valid keywords.
Don't include the companyid in the _all field. Or, better, just search
on the fields you really want to search on, instead of the _all field
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.