Index and query brackets

2016-07-04 Thread Anil
HI,

how can index and query content with brackets as bracket is used for range
query

Ex : [DATA]

-
Anil


filter groups

2016-07-04 Thread Thomas Scheffler

Hi,

I have metadata and file indexed in solr. All have a different id of 
cause but share the same value for "returnId" if they belong to the same 
metadata that describes a bunch of files (1:n).


When I start a search. I usually use grouping instead of join queries to 
keep the information where the hit occurred.


Now there it's getting tricky. I want to filter out groups depending on 
a field that is only available on metadata documents: visibility.


I want to search in solr like: "Find all documents containing 'foo' 
grouped by returnId, where the metadata visibility is 'public'"


So it should find any 'foo' files but only display the result if the 
corresponding metadata documents field visibility='public'.


Faceting also uses just the information inside groups. Can I give SOLR 
some information for 'fq' and 'facet.*' to work with my setup?


I am still using SOLR 4.10.5

kind regards

Thomas


Re: Error when highlighting on multiValued fields

2016-07-04 Thread Zheng Lin Edwin Yeo
I found that if I set the termOffsets="false", then I can eliminate the
error, and the highlighting will work normally.


But what could be the reason that setting the termOffsets will cause the
error on the multiValued field with fieldType="string"?

Regards,
Edwin


On 4 July 2016 at 12:30, Zheng Lin Edwin Yeo  wrote:

> Hi,
>
> I'm getting this error when I tried to do highlighting search on a
> multiValued field.
>
>   "error":{
> "metadata":[
>   "error-class","org.apache.solr.common.SolrException",
>   
> "root-error-class","org.apache.lucene.search.highlight.InvalidTokenOffsetsException"],
> "msg":"org.apache.lucene.search.highlight.InvalidTokenOffsetsException: 
> Token eee1 exceeds length of provided text sized 3",
> "trace":"org.apache.solr.common.SolrException: 
> org.apache.lucene.search.highlight.InvalidTokenOffsetsException: Token eee1 
> exceeds length of provided text sized 3\r\n\tat 
> org.apache.solr.highlight.DefaultSolrHighlighter.doHighlightingByHighlighter(DefaultSolrHighlighter.java:614)\r\n\tat
>  
> org.apache.solr.highlight.DefaultSolrHighlighter.doHighlightingOfField(DefaultSolrHighlighter.java:448)\r\n\tat
>  
> org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting(DefaultSolrHighlighter.java:410)\r\n\tat
>  
> org.apache.solr.handler.component.HighlightComponent.process(HighlightComponent.java:142)\r\n\tat
>  
> org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:293)\r\n\tat
>  
> org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156)\r\n\tat
>  org.apache.solr.core.SolrCore.execute(SolrCore.java:2036)\r\n\tat 
> org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:657)\r\n\tat 
> org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)\r\n\tat 
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)\r\n\tat
>  
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)\r\n\tat
>  
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)\r\n\tat
>  
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)\r\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat
>  
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\r\n\tat
>  
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\r\n\tat
>  
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)\r\n\tat
>  
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)\r\n\tat
>  
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat
>  
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)\r\n\tat
>  
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat
>  
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\r\n\tat
>  
> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\r\n\tat
>  
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\r\n\tat
>  org.eclipse.jetty.server.Server.handle(Server.java:518)\r\n\tat 
> org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)\r\n\tat 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)\r\n\tat
>  
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)\r\n\tat
>  org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\r\n\tat 
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\r\n\tat
>  
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)\r\n\tat
>  
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)\r\n\tat
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)\r\n\tat
>  
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)\r\n\tat
>  java.lang.Thread.run(Thread.java:745)\r\nCaused by: 
> org.apache.lucene.search.highlight.InvalidTokenOffsetsException: Token edm1 
> exceeds length of provided text sized 3\r\n\tat 
> org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:225)\r\n\tat
>  
> org.apache.solr.highlight.DefaultSolrHighlighter.doHighlightingByHighlighter(DefaultSolrHighlighter.java:602)\r\n\t...
>  34 more\r\n",
> "code":500}}
>
>
> Below is my configuration for highlight.
>
>   
>   
>none
>10
>json
>true
>   text
>   id, title, subject, content_type, last_modified, score
> 
>
>   on
>id, title, subject, content, tag
>   true
>true
>   200
>   10
>   true
>
> true
> signature
> true
> 100
>  
>   
>
>
> Below is my s

Access Solr via Apache's mod_proxy_balancer or mod_jk (AJP)

2016-07-04 Thread Andreas Kahl
Hello everyone, 

we've setup two Solr servers (not SolrCloud) which shall be accessed via
Apache webserver's load balancing (either mod_proxy_balancer or mod_jk).


1. Is it possible to configure Solr >5 to enable an AJP port as this was
the case in earlier versions when running in Tomcat? 

2. If AJP/mod_jk is not possible, how should I set up
mod_proxy_balancer? At the moment I run into the error "All workers are
in error state". This is my current Apache config: 

BalancerMember http://server1:
BalancerMember http://server2:

ProxyPass /solrCluster balancer://solrCluster/solr
ProxyPassReverse /solrCluster balancer://solrCluster/solr

Accessing a single server with a non balanced ReverseProxy works
perfectly, but somehow mod_proxy_balancer's health checks do get
negative responses from Solr. Any ideas what's going wrong? (I already
tried putting /solr into the BalancerMembers to avoid the redirect from
/ to /solr)

Thanks
Andreas




Inconsistent parsing of pure negative queries inside brackets

2016-07-04 Thread Rahul Verma
Hi everyone,

While tracing a bug in one of our systems we notices some interesting
behavior from Solr.

These two queries return different results. I fail to understand why the
second query returns empty results just by adding brackets. Can you please
help us understand this behavior?
*1. Without Brackets:*
{ "responseHeader": { "status": 0, "QTime": 0, "params": { "q": "*:*", "
indent": "true", "fq": "-fl_monitoring_channel: 36 AND (title: salesforce)",
"wt": "json", "_": "1467637035433" } }, "response": { "numFound": 35541, "
start": 0, "docs": [...

*2. With Brackets:*
{ "responseHeader": { "status": 0, "QTime": 0, "params": { "q": "*:*", "
indent": "true", "fq": "*(*-fl_monitoring_channel: 36*)* AND (title:
salesforce)", "wt": "json", "_": "1467637344339" } }, "response": { "
numFound": 0, "start": 0, "docs": [] } }


Re: Spell check suggestions because of case

2016-07-04 Thread Alessandro Benedetti
Hi Kalpana,
can you explain better ?
In your index you have "diabetes" .
Which suggestion you would prefer to see ?
Seems not ab-normal to me.

Cheers

On Wed, Jun 29, 2016 at 9:18 PM, Kalpana 
wrote:

> Hello
>
> I am getting suggestions for Diabetes as diabetes - even though it brings
> the same results for both. I used the case filter to no use.
>
> Solrconfig
>   
>
> 
> default
> solr.IndexBasedSpellChecker
>  name="lookupImpl">org.apache.solr.spelling.suggest.tst.TSTLookup
> spell
> true
> spellchecker
> 
> 
>
> Schema
>
>  multiValued="true" />
>  required="false" />
>  stored="true"
> required="false" />
>  stored="true" required="false" />
>
> 
> 
> 
>
>  positionIncrementGap="100">
> 
>  class="solr.StandardTokenizerFactory"/>
>  ignoreCase="true"
> words="stopwords.txt"/>
>  class="solr.StandardFilterFactory"/>
>  class="solr.LowerCaseFilterFactory" />
>  class="solr.RemoveDuplicatesTokenFilterFactory"/>
> 
> 
>  class="solr.StandardTokenizerFactory"/>
>  synonyms="synonyms.txt"
> ignoreCase="true" expand="true"/>
>  ignoreCase="true"
> words="stopwords.txt"/>
>  class="solr.StandardFilterFactory"/>
>  class="solr.LowerCaseFilterFactory" />
>  class="solr.RemoveDuplicatesTokenFilterFactory"/>
> 
> 
>
> Any help is greatly appreciated
>
> Thank you!
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Spell-check-suggestions-because-of-case-tp4285027.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


Re: How to speed up field collapsing on large number of groups

2016-07-04 Thread Alessandro Benedetti
Have you tried with docValues for the fields involved in the collapse group
head selection ?

With a group head selection of "min" "max"and "sort" should work quite well.
Of course it depends of your formula.

Does your index change often ?
If the warming time is not a problem you could try with :

hint

Currently there is only one hint available "top_fc", which stands for top
level FieldCache. The top_fc hint is only available when collapsing on
String fields. top_fc provides the best query time speed but takes the
longest to warm on startup or following a commit. top_fc also will result
in having the collapsed field cached in memory twice if the it's used for
faceting or sorting.

Cheers

On Wed, Jun 29, 2016 at 1:59 AM, Jichi Guo  wrote:

> Thanks for the quick response, Joel!
>
> I am hoping to delay sharding if possible, which might involve more things
> to
> consider :)
>
>
>
> 1) What is the size of the result set before the collapse?
>
>
>
> When search with q=*:* for example, before collapse numFound is around 5
> million, and that after collapse is 2 million.
>
> I only return about the top 30 documents in the result.
>
>
>
> 2) Have you tested without the long formula, just using a field for the
> min/max. It would be good to understand the impact of the formula on
> performance.
>
>
>
> The performance seems to be affected by the number of fields appearing in
> the
> max formula.
>
>
>
> For example, that 5 million expensive query would take 4.4 sec.
>
> For both {!collapse field=productGroupId} and {!collapse
> field=productGroupId
> max=only_one_field}, the query time would reduce to around 2.4 sec.
>
> If I remove the entire collapse fq, then the query only took 1.3 sec.
>
>
>
> 3) How much memory do you have on the server and for the heap. Memory use
> rises with the cardinality of the collapse field. So you'll want to be sure
> there is enough memory to comfortably perform the collapse.
>
>
>
> I am setting Xmx to 24G. The total index size on disk is 50G.
>
> In solrconfig.xml, I use solr.FastLRUCache for filterCache with cache size
> 2048, solr.LRUCache for documentCache with cache size 32768, and
> solr.LRUCache
> for queryResultCache with cache size 4096. I am using default
> fieldValueCache.
>
>
>
> I found Collapsing QParser plugin explicitly uses lucene's field cache.
>
> Maybe, increasing fieldCache would help?  But I am not sure how to
> increase it
> in Solr.
>
>
> Sent from [Nylas N1](https://link.nylas.com/link/5tkvmhpozan5j5h3lhni487b
> /local-
>
> 481233c4-d727/0?redirect=https%3A%2F%2Fnylas.com%2Fn1%3Fref%3Dn1&r=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3Jn),
> the extensible, open source mail client.
>
> ![](https://link.nylas.com/open/5tkvmhpozan5j5h3lhni487b/local-
> 481233c4-d727?r=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3Jn)
>
> On Jun 28 2016, at 4:48 pm, Joel Bernstein 
> wrote:
>
> > Sharding will help, but you'll need to co-locate documents by group ID. A
> few questions / suggestions:
>
> >
>
> >
> >
>
> >
>
> > 1) What is the size of the result set before the collapse?
>
> >
>
> > 2) Have you tested without the long formula, just using a field for the
> min/max. It would be good to understand the impact of the formula on
> performance.
>
> >
>
> > 3) How much memory do you have on the server and for the heap. Memory use
> rises with the cardinality of the collapse field. So you'll want to be sure
> there is enough memory to comfortably perform the collapse.
>
> >
>
> >
> >
>
> >
>
> >
> >
>
> >
>
> >
> >
>
> >
>
> > Joel Bernstein
>
> >
>
> >
> [
> http://joelsolr.blogspot.com/](http://joelsolr.blogspot.com/&r=c29sci11c2VyQGx1Y2VuZS5hcGFjaGUub3Jn)
> >
>
> >
>
> >
> >
>
> >
>
> > On Tue, Jun 28, 2016 at 4:08 PM, jichi
> <[jichi...@gmail.com](mailto:jichi...@gmail.com)> wrote:
> >
>
> >
>
> >> Hi everyone,
> >
> >  I am using Solr 4.10 to index 20 million documents without sharding.
> >  Each document has a groupId field, and there are about 2 million groups.
> >  I found the search with collapsing on groupId significantly slower
> >  comparing to without collapsing, especially when combined with facet
> >  queries.
> >
> >  I am wondering what would be the general approach to speedup field
> >  collapsing by 2~4 times?
> >  Would sharding the index help?
> >  Is it possible to optimize collapsing without sharding?
> >
> >  The filter parameter for collapsing is like this:
> >
> >  q=*:*&fq={!collapse field=groupId max=sum(...a long formula...)}
> >
> >  I also put this fq into warmup queries xml to warmup caches. But still,
> >  when q changes and more fq are added, the collapsing search would take
> >  about 3~5 seconds. Without collapsing, the search can finish within 2
> >  seconds.
> >
> >  I am thinking to manually optimize CollapsingQParserPlugin through
> >  parallelization or extra caching.
> >  For example, is it possible to parallelize collapsing collector by
> >  different lucene index segments?
> >
> >  Thanks!
> >
> >  \--
> >  jichi
> >
>
> >
>

Re: Using n-grams vs AnalyzingInfixLookupFactory for suggestions in solr

2016-07-04 Thread Alessandro Benedetti
Hi Harsha,
my blog can help :

http://alexbenedetti.blogspot.co.uk/2015/07/solr-you-complete-me.html

Take a look to the related section.

Cheers

On Sun, Jun 26, 2016 at 5:27 PM, Erick Erickson 
wrote:

> 1> The difference is that the factory returns the original field
> from a "sidecar" index. If you're content with just firing a standard
> query at your main index and returning the associated fields
> then you can do this from the main index. You won't be able
> to do the sophisticated stuff with weights though.
>
> 2> https://issues.apache.org/jira/browse/LUCENE-6336
>
> 3> You can have multiple suggesters in the same component.
>
> Best,
> Erick
>
> On Thu, Jun 23, 2016 at 10:21 PM, Harsha JSN  wrote:
> > Hi,
> >I have some doubts regarding usage of AnalyzingInfixLookupFactory as
> >  lookup implementation for suggestions.
> >
> > 1.) AnalyzingInfixLookupFactory constructs n-grams for the suggestion
> field
> > while building suggestions index. If the main index which is used for
> > search is already having n-grams for this field, is it still preferred to
> > choose  AnalyzingInfixLookupFactory or can we directly build suggestions
> > from the main index?
> >
> > 2.) Also, AnalyzingInfixLookupFactory returns duplicate records if the
> > suggestion field has same value in multiple documents. Instead if i
> search
> > suggestions from main index (n-grams) i can eliminate the duplicates by
> > grouping the results. But grouping can be a complex operation.Can you
> guide
> > the correct approach here?
> >
> > 3.) Choosing FuzzyLookupFactory looks beneficial, but we have to filter
> the
> > results over user context and also we need to provide infix search
> > capabilities for suggestions which we can't.
> >
> > Can some one please help on this? Thanks in advance.
> >
> > Harsha.
>



-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


Re: clarification on using docvalues for sorting

2016-07-04 Thread Alessandro Benedetti
This is a recurrent question,
according to my knowledge docValues are not supported for analyzed fields (
even if the analysis is simply not tokenizing but only lowercasing).
At the moment as Erick suggested I encourage you to do the lowercasing
before the indexing phase, when you supply your data to solr.

A contribution for docValues supporting single token tokenized  analyzers
would be more than welcome.

Cheers

On Fri, Jun 24, 2016 at 1:44 AM, Erick Erickson 
wrote:

> You'd have to lowercase when the doc is
> prepared I'd think.
>
> Best,
> Erick
>
> On Thu, Jun 23, 2016 at 4:49 PM, Jay Potharaju 
> wrote:
> > Hi,
> > I am trying to do a case insensitive sorting on couple of fields.
> > For this I am doing the following
> >
> >   sortMissingLast="true"
> > omitNorms="true">
> >  
> > 
> >
> > 
> > 
> >
> > Above would not allow using this datatype with docvalues. Docvalues can
> > only be used with string & trie fields.
> > And also docvalues are recommended for sorting & faceting.
> >
> > How can i accomplish using docvalues for case-insensitive field types.?
> > Or what I am trying to do is not possible.
> >
> > --
> > Thanks
> > Jay
>



-- 
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

"Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?"

William Blake - Songs of Experience -1794 England


Delete Collection in SolrCloud

2016-07-04 Thread Swaraj Kumar
Hi,

I was trying to delete a collection in solrcloud but some server didn't
respond and hence some shard and replica didn't get deleted.

I deleted physical memory of remaining shard and replica manually but I can
see my collection reference in solrcloud because it is not able to find
core.

No when I try to create the collection it is not able to create also saying
collection is already present.

I have deleted the collection reference in zookeeper /collection and
deleted the config also from /configs.
There is nothing in my clusterstate.json.

Please help how to create collection?

Regards,


Swaraj Kumar
Senior Software Engineer I
MakeMyTrip.com
Mob No- 9811774497


stateless solr ?

2016-07-04 Thread Lorenzo Fundaró
Hello guys,

I am trying to run Solr on my infrastructure using docker containers and
Mesos. My problem is that I don't have a shared filesystem. I have a
cluster of 3 shards and 3 replicas (9 nodes in total) so if I distribute
well my nodes I always have 2 fallbacks of my data for every shard. Every
solr node will store the index in its internal docker filesystem. My
problem is that if I want to relocate a certain node (maybe an automatic
relocation because of a hardware failure), I need to create the core
manually in the new node because it's expecting to find the core.properties
file in the data folder and of course it won't because the storage is
ephemeral. Is there a way to make a new node join the cluster with no
manual intervention ?

Thanks in advance !


-- 

-- 
Lorenzo Fundaro
Backend Engineer
E-Mail: lorenzo.fund...@dawandamail.com

Fax   + 49 - (0)30 - 25 76 08 52
Tel+ 49 - (0)179 - 51 10 982

DaWanda GmbH
Windscheidstraße 18
10627 Berlin

Geschäftsführer: Claudia Helming, Niels Nüssler und Michael Pütz
AG Charlottenburg HRB 104695 B http://www.dawanda.com


Re: solrcloud goes down

2016-07-04 Thread Kent Mu
Thanks!

I understand now, let's focus on next question.
I configured the "maxConnections" and "maxConnectionsPerHost" in solr.xml
as you said before.
But I got the same failure result.
Looks like the http connection pool is exhausted and most threads are
waiting to get a free connection.
the configuration is as below


6
3
1
500


I posted the problem in JIRA before, the link is
https://issues.apache.org/jira/browse/SOLR-9253

I think you still remember that. you can get the java core log in the
attachments.

please help me analysis it.

2016-07-04 13:13 GMT+08:00 Shalin Shekhar Mangar :

> You are asking many different questions. Lets take them up one by one:
>
> You say that you use the singleton pattern to create and get the Solr
> server connection. Yes, that is fine. The CloudSolrServer is thread safe
> and can be shared across requests/threads. When your application exits, you
> should shutdown that object.
>
> Once you shutdown ZooKeeper, Solr cannot process any updates. This is by
> design. A running and functional Zookeeper is necessary for SolrCloud.
>
> On Fri, Jul 1, 2016 at 2:15 PM, 穆 俊峰  wrote:
>
> > Dear Mr. Experts!
> >
> >
> > I came across a problem when use solrcloud, it goes down. The version is
> > 4.9.1.
> >
> > we got the java core log, it looks like the http connection pool is
> > exhausted and most threads are waiting to get a free connection.
> >
> > I have increased http connection defaults for the SolrJ client, and also
> > configed the connection defaults in solr.xml for all shard servers as
> below.
> >
> >  > class="HttpShardHandlerFactory">
> > 6
> > 3
> > 1
> > 500
> > 
> >
> >
> >
> > the java stack as below
> >
> > "httpShardExecutor-3-thread-541" prio=10 tid=0x7f7b1c02b000
> nid=0x20af
> > waiting on condition [0x7f79fd49]
> >java.lang.Thread.State: WAITING (parking)
> > at sun.misc.Unsafe.park(Native Method)
> > - parking to wait for  <0x000605710068> (a
> > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
> > at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
> > at
> >
> java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
> > at org.apache.http.pool.PoolEntryFuture.await(PoolEntryFuture.java:133)
> > at
> >
> org.apache.http.pool.AbstractConnPool.getPoolEntryBlocking(AbstractConnPool.java:282)
> > at
> >
> org.apache.http.pool.AbstractConnPool.access$000(AbstractConnPool.java:64)
> > at
> >
> org.apache.http.pool.AbstractConnPool$2.getPoolEntry(AbstractConnPool.java:177)
> > at
> >
> org.apache.http.pool.AbstractConnPool$2.getPoolEntry(AbstractConnPool.java:170)
> > at org.apache.http.pool.PoolEntryFuture.get(PoolEntryFuture.java:102)
> > at
> >
> org.apache.http.impl.conn.PoolingClientConnectionManager.leaseConnection(PoolingClientConnectionManager.java:208)
> > at
> >
> org.apache.http.impl.conn.PoolingClientConnectionManager$1.getConnection(PoolingClientConnectionManager.java:195)
> > at
> >
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:422)
> > at
> >
> org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
> > at
> >
> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
> > at
> >
> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
> > at
> >
> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
> > at
> >
> org.apache.solr.client.solrj.impl.HttpSolrServer.executeMethod(HttpSolrServer.java:452)
> > at
> >
> org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:210)
> > at
> >
> org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:206)
> > at
> >
> org.apache.solr.client.solrj.impl.LBHttpSolrServer.doRequest(LBHttpSolrServer.java:340)
> > at
> >
> org.apache.solr.client.solrj.impl.LBHttpSolrServer.request(LBHttpSolrServer.java:301)
> > at
> >
> org.apache.solr.handler.component.HttpShardHandlerFactory.makeLoadBalancedRequest(HttpShardHandlerFactory.java:205)
> > at
> >
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:162)
> > at
> >
> org.apache.solr.handler.component.HttpShardHandler$1.call(HttpShardHandler.java:119)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> > at java.lang.Thread.run(Thread.java:724)
> >
> >
> >
> >
> > besides, we use the sin

Re: Inconsistent parsing of pure negative queries inside brackets

2016-07-04 Thread Erick Erickson
The Lucene query parser is _not_ a boolean query
language, see Hossman's excellent explanation here:
https://lucidworks.com/blog/2011/12/28/why-not-and-or-and-not/

In this case, add &debug=query to them both and you'll see something like:
---no parens
"-cat:electronics +name:test"

---parens
"+(-cat:electronics) +name:test"

The first is an optional (SHOULD) clause removing all docs with
electronics in the category
and a MUST clause for name:test

The second is a mandatory (MUST) clause removing all electronics
mentions in category
and a MUST clause for name:test.

This trips up a lot of people.

Best,
Erick


On Mon, Jul 4, 2016 at 6:04 AM, Rahul Verma  wrote:
> Hi everyone,
>
> While tracing a bug in one of our systems we notices some interesting
> behavior from Solr.
>
> These two queries return different results. I fail to understand why the
> second query returns empty results just by adding brackets. Can you please
> help us understand this behavior?
> *1. Without Brackets:*
> { "responseHeader": { "status": 0, "QTime": 0, "params": { "q": "*:*", "
> indent": "true", "fq": "-fl_monitoring_channel: 36 AND (title: salesforce)",
> "wt": "json", "_": "1467637035433" } }, "response": { "numFound": 35541, "
> start": 0, "docs": [...
>
> *2. With Brackets:*
> { "responseHeader": { "status": 0, "QTime": 0, "params": { "q": "*:*", "
> indent": "true", "fq": "*(*-fl_monitoring_channel: 36*)* AND (title:
> salesforce)", "wt": "json", "_": "1467637344339" } }, "response": { "
> numFound": 0, "start": 0, "docs": [] } }


Re: Access Solr via Apache's mod_proxy_balancer or mod_jk (AJP)

2016-07-04 Thread Shawn Heisey
On 7/4/2016 3:54 AM, Andreas Kahl wrote:
> Hello everyone,
>
> we've setup two Solr servers (not SolrCloud) which shall be accessed
> via Apache webserver's load balancing (either mod_proxy_balancer or
> mod_jk).
>
> 1. Is it possible to configure Solr >5 to enable an AJP port as this
> was the case in earlier versions when running in Tomcat?
>
> 2. If AJP/mod_jk is not possible, how should I set up
> mod_proxy_balancer? At the moment I run into the error "All workers
> are in error state". This is my current Apache config:
> 
> BalancerMember http://server1:
> BalancerMember http://server2:
> 
> ProxyPass /solrCluster balancer://solrCluster/solr
> ProxyPassReverse /solrCluster balancer://solrCluster/solr
>
> Accessing a single server with a non balanced ReverseProxy works
> perfectly, but somehow mod_proxy_balancer's health checks do get
> negative responses from Solr. Any ideas what's going wrong? (I already
> tried putting /solr into the BalancerMembers to avoid the redirect
> from / to /solr)

The eclipse wiki is down, but in the Google search results that link to
the wiki I can see the text "Using Apache mod_jk and the /Jetty AJP/
connector. We recommend using the HTTP connectors for the following
reasons: Jetty performs ..."

So for some reason I can't see at the moment, the Jetty authors don't
recommend AJP, even though it apparently can do it.  You can likely get
the AJP module working in the Jetty that Solr includes, but doing so is
outside the scope of this mailing list.

The only load balancer I've ever set up is haproxy.  I use the ping
request handler with the health check file (/solr/corename/admin/ping)
as the method for haproxy to decide when one of the Solr hosts is down. 
The health check file allows me to enable/disable a particular core so I
can influence load balancer decisions without shutting Solr down.

To get help with the proxy mod for Apache, you'll need to find a support
resource for the httpd project.  This is your best bet:

http://httpd.apache.org/lists.html

Thanks,
Shawn



Re: Inconsistent parsing of pure negative queries inside brackets

2016-07-04 Thread Shawn Heisey
On 7/4/2016 7:04 AM, Rahul Verma wrote:
> While tracing a bug in one of our systems we notices some interesting
> behavior from Solr. These two queries return different results. I fail
> to understand why the second query returns empty results just by
> adding brackets. Can you please help us understand this behavior?

Supplementing the excellent info that Erick gave you:

I was slightly surprised that the first query even works like you
expect.  Here's why the second one DOESN'T work:

What you've got is a negative query clause:

-fl_monitoring_channel:36

At the Lucene level, a purely negative query will never work in
isolation, because you can't subtract from nothing and expect results --
you must always start with something, and THEN subtract from it.

Solr has some logic in its version of the Lucene query parser that can
detect *simple* negative query clauses and implicitly add a "*:*"
starting point before sending the query to Lucene for handling.  This
logic only works at the top level -- if the negative query is a
subordinate clause, it will not be seen by this logic, and the implicit
fix will not be added, so the query won't work.

By adding parentheses, you have turned this negative query clause into a
subordinate clause.  If you explicitly add the *:* starting point, it
will work:

(*:* -fl_monitoring_channel:36)

Thanks,
Shawn



deploy solr on cloud providers

2016-07-04 Thread Lorenzo Fundaró
Hi guys,

when deploying solr (in solrcloud mode) in the cloud one has to take care
of storage, and as far as I understand it can be a problem because the
storage should go wherever the node is created. If we have for example, a
node on EC2 with its own persistent disk, this node happens to be the
leader and at some point crashes but couldn't make the replication of the
data that has in the transaction log, how do we do in that case ? Ideally
the new node must use the leftover data that the death node left, but this
is a bit cumbersome in my opinion.

What are the best practices for this ?

thanks in advance.

-- 

-- 
Lorenzo Fundaro
Backend Engineer
E-Mail: lorenzo.fund...@dawandamail.com

Fax   + 49 - (0)30 - 25 76 08 52
Tel+ 49 - (0)179 - 51 10 982

DaWanda GmbH
Windscheidstraße 18
10627 Berlin

Geschäftsführer: Claudia Helming und Niels Nüssler
AG Charlottenburg HRB 104695 B http://www.dawanda.com


Re: deploy solr on cloud providers

2016-07-04 Thread Shawn Heisey
On 7/4/2016 10:18 AM, Lorenzo Fundaró wrote:
> when deploying solr (in solrcloud mode) in the cloud one has to take
> care of storage, and as far as I understand it can be a problem
> because the storage should go wherever the node is created. If we have
> for example, a node on EC2 with its own persistent disk, this node
> happens to be the leader and at some point crashes but couldn't make
> the replication of the data that has in the transaction log, how do we
> do in that case ? Ideally the new node must use the leftover data that
> the death node left, but this is a bit cumbersome in my opinion. What
> are the best practices for this ? 

I can't make any sense of this.  What is the *exact* problem you need to
solve?  The details can be very important.

We might be dealing with this:

http://people.apache.org/~hossman/#xyproblem

Thanks,
Shawn



Re: stateless solr ?

2016-07-04 Thread Steven Bower
We have been working on some changes that should help with this.. 1st
challenge is having the node name remain static regardless of where the
node runs (right now it uses host and port, so this won't work unless you
are using some sort of tunneled or dynamic networking).. We have a patch we
are working on for this.. Once this is in place and you use the "zookeeper
is truth" mode for solr cloud and this should seamlessly transition into
the new node (and replicate).. Will update with the ticket number as I
forget it off hand

Steve
On Mon, Jul 4, 2016 at 9:47 AM Lorenzo Fundaró <
lorenzo.fund...@dawandamail.com> wrote:

> Hello guys,
>
> I am trying to run Solr on my infrastructure using docker containers and
> Mesos. My problem is that I don't have a shared filesystem. I have a
> cluster of 3 shards and 3 replicas (9 nodes in total) so if I distribute
> well my nodes I always have 2 fallbacks of my data for every shard. Every
> solr node will store the index in its internal docker filesystem. My
> problem is that if I want to relocate a certain node (maybe an automatic
> relocation because of a hardware failure), I need to create the core
> manually in the new node because it's expecting to find the core.properties
> file in the data folder and of course it won't because the storage is
> ephemeral. Is there a way to make a new node join the cluster with no
> manual intervention ?
>
> Thanks in advance !
>
>
> --
>
> --
> Lorenzo Fundaro
> Backend Engineer
> E-Mail: lorenzo.fund...@dawandamail.com
>
> Fax   + 49 - (0)30 - 25 76 08 52
> Tel+ 49 - (0)179 - 51 10 982
>
> DaWanda GmbH
> Windscheidstraße 18
> 10627 Berlin
>
> Geschäftsführer: Claudia Helming, Niels Nüssler und Michael Pütz
> AG Charlottenburg HRB 104695 B http://www.dawanda.com
>


Filter Query that matches all values of a field

2016-07-04 Thread Vasu Y
Hi,
 I have a single type field that can contain zero or more values (comma
separated values). This field stores some sort of access value.

In the filter, I am given a list of allowed values for the field and a
document must be considered if all values contained in its field must be
present in the allowed values specified in the filter.
How can i write filter query for this?

To illustrate this further:
If a field "field1" in a document contains (a1, a3, a5) values.

   1. Case #1) If the allowed values specified in the filter are (a1, a3,
   a4, a6) --> the document should not be considered since user doesn’t have
   access to “a5”.
   2. Case #2) If the allowed values specified in the filter are (a2, a4,
   a6) --> the document should not be considered since user doesn’t have
   access to “a1, a3, a5”.
   3. Case #3) If the allowed values specified in the filter are (a1, a3,
   a5) --> the document should be considered since user has access to all
   values of the field.
   4. Case #4) If the allowed values specified in the filter are (a1, a2,
   a3, a4, a5, a6) --> the document should be considered since user has access
   to all values of the field (and some more values also).


Thanks,
Vasu


Re: stateless solr ?

2016-07-04 Thread Upayavira
Are you using Solrcloud? With Solrcloud this stuff is easy. You just add
a new replica for a collection, and the data is added to the new host.

I'm working on a demo that will show this all working within Docker and
Rancher. I've got some code (which I will open source) that handles
config uploads, collection creation, etc. You can add a replica by
running a container on the same node as you want the replica to reside,
it'll do the rest for you.

I've got the Solr bit more or less done, I'm now working on everything
else (Dockerised Docker Registry/Jenkins, AWS infra build, etc).

Let me know if this is interesting to you. If so, I'll post it here when
I'm done with it.

Upayavira

On Mon, 4 Jul 2016, at 02:46 PM, Lorenzo Fundaró wrote:
> Hello guys,
> 
> I am trying to run Solr on my infrastructure using docker containers and
> Mesos. My problem is that I don't have a shared filesystem. I have a
> cluster of 3 shards and 3 replicas (9 nodes in total) so if I distribute
> well my nodes I always have 2 fallbacks of my data for every shard. Every
> solr node will store the index in its internal docker filesystem. My
> problem is that if I want to relocate a certain node (maybe an automatic
> relocation because of a hardware failure), I need to create the core
> manually in the new node because it's expecting to find the
> core.properties
> file in the data folder and of course it won't because the storage is
> ephemeral. Is there a way to make a new node join the cluster with no
> manual intervention ?
> 
> Thanks in advance !
> 
> 
> -- 
> 
> -- 
> Lorenzo Fundaro
> Backend Engineer
> E-Mail: lorenzo.fund...@dawandamail.com
> 
> Fax   + 49 - (0)30 - 25 76 08 52
> Tel+ 49 - (0)179 - 51 10 982
> 
> DaWanda GmbH
> Windscheidstraße 18
> 10627 Berlin
> 
> Geschäftsführer: Claudia Helming, Niels Nüssler und Michael Pütz
> AG Charlottenburg HRB 104695 B http://www.dawanda.com


Re: stateless solr ?

2016-07-04 Thread Steven Bower
My main issue is having to make any solr collection api calls during a
transition.. It makes integrating with orchestration engines way more
complex..
On Mon, Jul 4, 2016 at 3:40 PM Upayavira  wrote:

> Are you using Solrcloud? With Solrcloud this stuff is easy. You just add
> a new replica for a collection, and the data is added to the new host.
>
> I'm working on a demo that will show this all working within Docker and
> Rancher. I've got some code (which I will open source) that handles
> config uploads, collection creation, etc. You can add a replica by
> running a container on the same node as you want the replica to reside,
> it'll do the rest for you.
>
> I've got the Solr bit more or less done, I'm now working on everything
> else (Dockerised Docker Registry/Jenkins, AWS infra build, etc).
>
> Let me know if this is interesting to you. If so, I'll post it here when
> I'm done with it.
>
> Upayavira
>
> On Mon, 4 Jul 2016, at 02:46 PM, Lorenzo Fundaró wrote:
> > Hello guys,
> >
> > I am trying to run Solr on my infrastructure using docker containers and
> > Mesos. My problem is that I don't have a shared filesystem. I have a
> > cluster of 3 shards and 3 replicas (9 nodes in total) so if I distribute
> > well my nodes I always have 2 fallbacks of my data for every shard. Every
> > solr node will store the index in its internal docker filesystem. My
> > problem is that if I want to relocate a certain node (maybe an automatic
> > relocation because of a hardware failure), I need to create the core
> > manually in the new node because it's expecting to find the
> > core.properties
> > file in the data folder and of course it won't because the storage is
> > ephemeral. Is there a way to make a new node join the cluster with no
> > manual intervention ?
> >
> > Thanks in advance !
> >
> >
> > --
> >
> > --
> > Lorenzo Fundaro
> > Backend Engineer
> > E-Mail: lorenzo.fund...@dawandamail.com
> >
> > Fax   + 49 - (0)30 - 25 76 08 52
> > Tel+ 49 - (0)179 - 51 10 982
> >
> > DaWanda GmbH
> > Windscheidstraße 18
> > 10627 Berlin
> >
> > Geschäftsführer: Claudia Helming, Niels Nüssler und Michael Pütz
> > AG Charlottenburg HRB 104695 B http://www.dawanda.com
>


Re: Filter Query that matches all values of a field

2016-07-04 Thread Ahmet Arslan
Hi Vasu,


This question appears occasionally in the mailing list.
Please see https://issues.apache.org/jira/browse/LUCENE-7148

ahmet


On Monday, July 4, 2016 9:10 PM, Vasu Y  wrote:



Hi,
I have a single type field that can contain zero or more values (comma
separated values). This field stores some sort of access value.

In the filter, I am given a list of allowed values for the field and a
document must be considered if all values contained in its field must be
present in the allowed values specified in the filter.
How can i write filter query for this?

To illustrate this further:
If a field "field1" in a document contains (a1, a3, a5) values.

   1. Case #1) If the allowed values specified in the filter are (a1, a3,
   a4, a6) --> the document should not be considered since user doesn’t have
   access to “a5”.
   2. Case #2) If the allowed values specified in the filter are (a2, a4,
   a6) --> the document should not be considered since user doesn’t have
   access to “a1, a3, a5”.
   3. Case #3) If the allowed values specified in the filter are (a1, a3,
   a5) --> the document should be considered since user has access to all
   values of the field.
   4. Case #4) If the allowed values specified in the filter are (a1, a2,
   a3, a4, a5, a6) --> the document should be considered since user has access
   to all values of the field (and some more values also).


Thanks,
Vasu


Re: stateless solr ?

2016-07-04 Thread Upayavira
What do you mean by a "transition"?

Can you configure a sidekick container within your orchestrator? Have a
sidekick always run alongside your SolrCloud nodes? In which case, this
would be an app that does the calling of the API for you.

Upayavira

On Mon, 4 Jul 2016, at 08:53 PM, Steven Bower wrote:
> My main issue is having to make any solr collection api calls during a
> transition.. It makes integrating with orchestration engines way more
> complex..
> On Mon, Jul 4, 2016 at 3:40 PM Upayavira  wrote:
> 
> > Are you using Solrcloud? With Solrcloud this stuff is easy. You just add
> > a new replica for a collection, and the data is added to the new host.
> >
> > I'm working on a demo that will show this all working within Docker and
> > Rancher. I've got some code (which I will open source) that handles
> > config uploads, collection creation, etc. You can add a replica by
> > running a container on the same node as you want the replica to reside,
> > it'll do the rest for you.
> >
> > I've got the Solr bit more or less done, I'm now working on everything
> > else (Dockerised Docker Registry/Jenkins, AWS infra build, etc).
> >
> > Let me know if this is interesting to you. If so, I'll post it here when
> > I'm done with it.
> >
> > Upayavira
> >
> > On Mon, 4 Jul 2016, at 02:46 PM, Lorenzo Fundaró wrote:
> > > Hello guys,
> > >
> > > I am trying to run Solr on my infrastructure using docker containers and
> > > Mesos. My problem is that I don't have a shared filesystem. I have a
> > > cluster of 3 shards and 3 replicas (9 nodes in total) so if I distribute
> > > well my nodes I always have 2 fallbacks of my data for every shard. Every
> > > solr node will store the index in its internal docker filesystem. My
> > > problem is that if I want to relocate a certain node (maybe an automatic
> > > relocation because of a hardware failure), I need to create the core
> > > manually in the new node because it's expecting to find the
> > > core.properties
> > > file in the data folder and of course it won't because the storage is
> > > ephemeral. Is there a way to make a new node join the cluster with no
> > > manual intervention ?
> > >
> > > Thanks in advance !
> > >
> > >
> > > --
> > >
> > > --
> > > Lorenzo Fundaro
> > > Backend Engineer
> > > E-Mail: lorenzo.fund...@dawandamail.com
> > >
> > > Fax   + 49 - (0)30 - 25 76 08 52
> > > Tel+ 49 - (0)179 - 51 10 982
> > >
> > > DaWanda GmbH
> > > Windscheidstraße 18
> > > 10627 Berlin
> > >
> > > Geschäftsführer: Claudia Helming, Niels Nüssler und Michael Pütz
> > > AG Charlottenburg HRB 104695 B http://www.dawanda.com
> >


Re: stateless solr ?

2016-07-04 Thread Steven Bower
I don't think that's a bad approach with the sidecar.. We run a huge number
of solr ~5k instances so adding sidecars for each one ads a lot of extra
containers..

What I mean by transition is a container dying and a new one being brought
online to replace it.. With the mod we are working on you won't need the
sidecar to add cores to the new node via the API and remove the old cores..
A new instance would start up with the same node name and just take over
the existing cores (of course will require replication but that will happen
automatically )

Steve
On Mon, Jul 4, 2016 at 5:27 PM Upayavira  wrote:

> What do you mean by a "transition"?
>
> Can you configure a sidekick container within your orchestrator? Have a
> sidekick always run alongside your SolrCloud nodes? In which case, this
> would be an app that does the calling of the API for you.
>
> Upayavira
>
> On Mon, 4 Jul 2016, at 08:53 PM, Steven Bower wrote:
> > My main issue is having to make any solr collection api calls during a
> > transition.. It makes integrating with orchestration engines way more
> > complex..
> > On Mon, Jul 4, 2016 at 3:40 PM Upayavira  wrote:
> >
> > > Are you using Solrcloud? With Solrcloud this stuff is easy. You just
> add
> > > a new replica for a collection, and the data is added to the new host.
> > >
> > > I'm working on a demo that will show this all working within Docker and
> > > Rancher. I've got some code (which I will open source) that handles
> > > config uploads, collection creation, etc. You can add a replica by
> > > running a container on the same node as you want the replica to reside,
> > > it'll do the rest for you.
> > >
> > > I've got the Solr bit more or less done, I'm now working on everything
> > > else (Dockerised Docker Registry/Jenkins, AWS infra build, etc).
> > >
> > > Let me know if this is interesting to you. If so, I'll post it here
> when
> > > I'm done with it.
> > >
> > > Upayavira
> > >
> > > On Mon, 4 Jul 2016, at 02:46 PM, Lorenzo Fundaró wrote:
> > > > Hello guys,
> > > >
> > > > I am trying to run Solr on my infrastructure using docker containers
> and
> > > > Mesos. My problem is that I don't have a shared filesystem. I have a
> > > > cluster of 3 shards and 3 replicas (9 nodes in total) so if I
> distribute
> > > > well my nodes I always have 2 fallbacks of my data for every shard.
> Every
> > > > solr node will store the index in its internal docker filesystem. My
> > > > problem is that if I want to relocate a certain node (maybe an
> automatic
> > > > relocation because of a hardware failure), I need to create the core
> > > > manually in the new node because it's expecting to find the
> > > > core.properties
> > > > file in the data folder and of course it won't because the storage is
> > > > ephemeral. Is there a way to make a new node join the cluster with no
> > > > manual intervention ?
> > > >
> > > > Thanks in advance !
> > > >
> > > >
> > > > --
> > > >
> > > > --
> > > > Lorenzo Fundaro
> > > > Backend Engineer
> > > > E-Mail: lorenzo.fund...@dawandamail.com
> > > >
> > > > Fax   + 49 - (0)30 - 25 76 08 52
> > > > Tel+ 49 - (0)179 - 51 10 982
> > > >
> > > > DaWanda GmbH
> > > > Windscheidstraße 18
> > > > 10627 Berlin
> > > >
> > > > Geschäftsführer: Claudia Helming, Niels Nüssler und Michael Pütz
> > > > AG Charlottenburg HRB 104695 B http://www.dawanda.com
> > >
>


Re: Index and query brackets

2016-07-04 Thread Zheng Lin Edwin Yeo
Hi Anil,

Are you referring to something like q=level:[1 TO 5] ? This will search for
level that ranges from 1 to 5.
You may refer to the documentation here:
https://wiki.apache.org/solr/SolrQuerySyntax

Regards,
Edwin


On 4 July 2016 at 15:05, Anil  wrote:

> HI,
>
> how can index and query content with brackets as bracket is used for range
> query
>
> Ex : [DATA]
>
> -
> Anil
>


Re: Index and query brackets

2016-07-04 Thread Anil
NO Ediwin. Thanks for your response.

i was checking how to check [1 TO 5] as a content not as a range query.

i tried by escaping [ and ] and did not work. seems need to check analyzers
at index side.

Regards,
Anil

On 5 July 2016 at 08:42, Zheng Lin Edwin Yeo  wrote:

> Hi Anil,
>
> Are you referring to something like q=level:[1 TO 5] ? This will search for
> level that ranges from 1 to 5.
> You may refer to the documentation here:
> https://wiki.apache.org/solr/SolrQuerySyntax
>
> Regards,
> Edwin
>
>
> On 4 July 2016 at 15:05, Anil  wrote:
>
> > HI,
> >
> > how can index and query content with brackets as bracket is used for
> range
> > query
> >
> > Ex : [DATA]
> >
> > -
> > Anil
> >
>


Effects of setting termOffsets to false

2016-07-04 Thread Zheng Lin Edwin Yeo
Hi,

I would like to find out, is there any implication of using termVectors,
but setting the term offsets to false?

This is what I am setting for my


I'm currently setting the termOffsets to false, because when I set it to
true, I'm getting this error during highlighting if I have 3 or more values
in my tag field.

  "error":{
"metadata":[
  "error-class","org.apache.solr.common.SolrException",
  
"root-error-class","org.apache.lucene.search.highlight.InvalidTokenOffsetsException"],
"msg":"org.apache.lucene.search.highlight.InvalidTokenOffsetsException:
Token eee1 exceeds length of provided text sized 3",
"trace":"org.apache.solr.common.SolrException:
org.apache.lucene.search.highlight.InvalidTokenOffsetsException: Token
eee1 exceeds length of provided text sized 3\r\n\tat
org.apache.solr.highlight.DefaultSolrHighlighter.doHighlightingByHighlighter(DefaultSolrHighlighter.java:614)\r\n\tat
org.apache.solr.highlight.DefaultSolrHighlighter.doHighlightingOfField(DefaultSolrHighlighter.java:448)\r\n\tat
org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting(DefaultSolrHighlighter.java:410)\r\n\tat
org.apache.solr.handler.component.HighlightComponent.process(HighlightComponent.java:142)\r\n\tat
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:293)\r\n\tat
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:156)\r\n\tat
org.apache.solr.core.SolrCore.execute(SolrCore.java:2036)\r\n\tat
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:657)\r\n\tat
org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:464)\r\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257)\r\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208)\r\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1668)\r\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:581)\r\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\r\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\r\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\r\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1160)\r\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)\r\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\r\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1092)\r\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\r\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\r\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\r\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\r\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:518)\r\n\tat
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:308)\r\n\tat
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:244)\r\n\tat
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)\r\n\tat
org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\r\n\tat
org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\r\n\tat
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:246)\r\n\tat
org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:156)\r\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)\r\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)\r\n\tat
java.lang.Thread.run(Thread.java:745)\r\nCaused by:
org.apache.lucene.search.highlight.InvalidTokenOffsetsException: Token
edm1 exceeds length of provided text sized 3\r\n\tat
org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:225)\r\n\tat
org.apache.solr.highlight.DefaultSolrHighlighter.doHighlightingByHighlighter(DefaultSolrHighlighter.java:602)\r\n\t...
34 more\r\n",
"code":500}}


Regards,
Edwin


Re: Delete Collection in SolrCloud

2016-07-04 Thread Zheng Lin Edwin Yeo
Have you deleted the log and snapshots (the place where the configurations
are stored) in the zookeeper?

If you have deleted them, then you will need to push your configurations to
zookeeper again before creating the collection.

Regards,
Edwin


On 4 July 2016 at 21:37, Swaraj Kumar  wrote:

> Hi,
>
> I was trying to delete a collection in solrcloud but some server didn't
> respond and hence some shard and replica didn't get deleted.
>
> I deleted physical memory of remaining shard and replica manually but I can
> see my collection reference in solrcloud because it is not able to find
> core.
>
> No when I try to create the collection it is not able to create also saying
> collection is already present.
>
> I have deleted the collection reference in zookeeper /collection and
> deleted the config also from /configs.
> There is nothing in my clusterstate.json.
>
> Please help how to create collection?
>
> Regards,
>
>
> Swaraj Kumar
> Senior Software Engineer I
> MakeMyTrip.com
> Mob No- 9811774497
>


Suggester Issue

2016-07-04 Thread Rajesh Kapur
Hi,



I tried to implement suggester using SOLR 6.0.1 with context field. PFB the
configuration we are using to implement suggester





  



  mySuggester

  

  AnalyzingInfixLookupFactory

  suggester_infixdata_dir

  DocumentDictionaryFactory

  SearchSuggestions

BrandName

  suggest

  true

  



  



  



  true

  10

  mySuggester

  





  suggest_sitesearch



  



But I am not able to get the desired output using suggest.cfq parameter.
Could you please help me in getting the correct output.



-Thanks,

Rajesh Kapur