solr init script won't execute under user account without login shell

2017-02-04 Thread Michael Dürr
Hello,

please apologize if this is the wrong place to file my request! (Should I
open a JIRA issue instead?)

The problem:

I'm using solr 6.3.0. In my solr setup I apply some plugin code which
requires write access to some directories which are owned by the user
"tomcat". This user has no login shell (i.e. passwd holds /bin/false).

Due to our security policies I'm not allowed to simply add the "solr" user
to the "tomcat" group (in order to provide him write access to those
directories).

The obvious solution is to install solr under user "tomcat" (i.e. execute
the solr installation script with parameter "-u tomcat")

However, due to the missing login shell I won't be able to start solr via
the standard solr init script any longer.

My temporary solution is to add the command line option "-s /bin/bash" to
the solr init script by hand.

Is there already a better way to avoid this manual modification?

If not - might it be a good idea to add an option to the installation
script in order to specify a shell?

Best regards,
Michael


Re: Issues with uniqueKey != id?

2017-02-04 Thread Susheel Kumar
Hello,

So far in my experience haven't come across scenario where unique key/id is
not required.  Most of the times, I have put combination of few fields
like aggregate
or compound keys .  (e.g.
organization_id + employee_id etc.).  The reason it makes sense to have
some form of unique key is two fold
a) if there is no unique key, it kind of become impossible to update any
existing records since you can't uniquely identify them which means your
index will keep growing
b)  If no unique key then when you return search results, you wouldn't have
anything to relate with other/external system

Sometime you may have time-series data in which case may be timestamp or
combination of timestamp / other field may make sense  but yes Unique key
is not mandatory.

Thanks,
Susheel

On Fri, Feb 3, 2017 at 11:49 AM, Matthias X Falkenberg 
wrote:

> Howdy,
>
> In the Solr Wiki I stumbled upon a somewhat vague statement on the
> uniqueKey:
>
> >  https://wiki.apache.org/solr/SchemaXml#The_Unique_Key_Field
> >  It shouldn't matter whether you rename this to something else (and
> change the  value), but occasionally it has in the past. We
> recommend that you just leave this definition alone.
>
> I'd be very grateful for any positive or negative experiences with
> "uniqueKey" not being set to "id" - especially if your experiences are
> related to Solr 6.2.1+.
>
> Many thanks,
>
> Matthias Falkenberg
>
> IBM Deutschland Research & Development GmbH / Vorsitzende des
> Aufsichtsrats: Martina Koederitz
> Geschäftsführung: Dirk Wittkopp
> Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart,
> HRB 243294
>
>


Query/Field Index Analysis corrected but return no docs in search

2017-02-04 Thread Peter Liu
hi all:
   I was using solr 3.6 and tried to solve a recall-problem today , but
encountered a weird problem.

   There's doc with field value : 均匀肤色, (just treated that word as a symbol
if you don't know it, I just want to describe the problem as exact as
possible).


   And below was the analysis result ( tokenization) :

  [image: Inline image 2]

  ( and text-version if need.

Index Analyzer
均匀肤色 均匀 匀肤 肤色
均匀肤色 均匀 匀肤 肤色
均匀肤色 均匀 匀肤 肤色
Query Analyzer
均匀肤色
均匀肤色
均匀肤色
均匀肤色


​ The tokenization result indicate the query will recall/hit the doc
​undoubtedly. But the doc did not appear in the result if I search with
"均匀肤色". I tried to simplify the qf/bf/fq/q, just test it with single field
and single document, to make sure it was not caused by other problems but
failed.


​It's knotty to debug because it only reproduced in
​
​product environments, I tried same config/index/query but not produce in
dev ​environment. I'm here ask for helps if you met similar problem, or any
clues/debug-method will be really helped.