Re: Understanding the MoreLikeThis Handler

2015-06-23 Thread Sreekant Sreedharan
This has been resolved. The issue was indeed the mlt.mintf value.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Understanding-the-MoreLikeThis-Handler-tp4213279p4213399.html
Sent from the Solr - User mailing list archive at Nabble.com.


Index time field boost with solrj?

2015-06-23 Thread Karl Kildén
Hello! Can I boost fields at index time with the solrj client? If not what
do you recommend? Feels like it would be expensive to always do it at query
time?

Cheers


Re: Solr Exact match boost Reduce the results

2015-06-23 Thread Alessandro Benedetti
Hi Jack,

2015-06-23 6:27 GMT+01:00 JACK :

> Hi  Alessandro Benedetti,
>
> I have changed the query like this.
>
>
> /select?q=("dell+laptop"~13+OR+"dell+laptop")&df=product_name&defType=edismax&qf=product_name^0.001+dummy_product_name^2&fl=product_name&wt=json&indent=true&debug=true
>

Pardon me, but I find this query awful. In my opinion is not necessary at
all.
I can't take a deep look to your debug right now, but I suggest you to use
this free tool ( http://splainer.io ) to read it easily .
 My suggestions remain :

1) carefully take care of your analysis
2) carefully take care of the schema ( field attributes)
3) carefully take care of the handler config

Cheers

>
> The corresponding results also given in the below link.Now am getting exact
> match first.
>
> http://pastebin.com/rAYrFiB8
>
>
> Now the problem is Look at the 8th result
> "product_name":"Dell Inspiron 15R 15.6-inch Laptop without Laptop Bag by
> Dell", its not a relevant result
> can you check How this happens , check the scores.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-Exact-match-boost-Reduce-the-results-tp4211352p4213382.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: Understanding the MoreLikeThis Handler

2015-06-23 Thread Alessandro Benedetti
You are welcome ;)

2015-06-23 9:27 GMT+01:00 Sreekant Sreedharan :

> This has been resolved. The issue was indeed the mlt.mintf value.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Understanding-the-MoreLikeThis-Handler-tp4213279p4213399.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


Question regarding getting back results from middle of word

2015-06-23 Thread Karl Kildén
Hello!

if I have a field like "onetwothreefour" I want users to find that document
with a query for "two". This seems to work when I use





I got that one off google. The problem is I really want a search for "one"
to be regarded as a better hit but seems the fragments created are like an
equal word, or am I missing something? I also don't want those fragments to
be a part of the spelling index...

Feels like I am missing something on how to best configure wildcards in a
word yet not affecting my index.

Cheers


Re: Solr Exact match boost Reduce the results

2015-06-23 Thread JACK
Hi  Alessandro Benedetti,
Can you check what happens to the below given product_name , just check its
score 

"product_name":"LAPTOP BATTERY DELL Inspiron 6400 1501 E1505 RD859 UD267
XU937"
How is this product comes , ?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-Exact-match-boost-Reduce-the-results-tp4211352p4213417.html
Sent from the Solr - User mailing list archive at Nabble.com.


Implicit Router Configurations

2015-06-23 Thread Arnon Yogev
We have a use case where documents are indexed in shards according to a 
specific field (shard per user), and the number of shards is unknown when 
creating the collection.
For that purpose we use the implicit router and define router.field=user.

>From what we've seen, the only way to define an implicit router is during 
the collection creation. 
Moreover, the router definitions (router.name and router.field) are kept 
only in clusterstate.json and not in any solr configuration file on disk.

In some cases solr state becomes inconsistent and we need to delete the 
configs from ZK and restart the solr server. The behavior we see is the 
new clusterstate.json generated by solr on startup has the default 
router.name=compositeId, which is not what we defined during creation.

Are we missing something? Is there a place to configure the implicit 
router on disk such that it will be persistent?

Thanks,
Arnon




copyField based on value of another field

2015-06-23 Thread Alistair Young
Hi folks,

is it possible to copyField only if another field has a certain value? e.g.

copyField 'dc.subject' to 'image_suggestions' only if rdf 
http://www.nsdl.org/ontologies/relationships#isInImageBank is true

thanks,

Alistair

--
mov eax,1
mov ebx,0
int 80h


Costume searchHandlers in a multi core envirment

2015-06-23 Thread 1234go1
Hi,
I have a search handler I wrote that runs a sub query so that the main query
I send to the SearchHandler is extended.
This was working very nice till I changed my env to a be multi sharded.
Now my searcher is always opened to the same core and not to the core that
the shard asks for.
For example:
I have core1 & core2.
my http request : 
localhost:8983/solr/core1/myselect?q=text%3Aabc&
shards=http://localhost:8983/solr/core1%20http://localhost:8983/solr/core2

I get to myselect handler twice but the searcher opens to core1 in both
cases never to core2.
Any ideas?



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Costume-searchHandlers-in-a-multi-core-envirment-tp4213436.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Question regarding getting back results from middle of word

2015-06-23 Thread Alessandro Benedetti
It sounds the classic XY problem , can you explain us a little bit better
your problem ?
Why you have such strange field content, how do you produce it ?
Can this be solved with an analysis ad hoc for your language ?

It sounds to me as a tokenization problem, and you are not going to solve
it using edge grams …

Please give us more details,

Cheers

2015-06-23 11:41 GMT+01:00 Karl Kildén :

> Hello!
>
> if I have a field like "onetwothreefour" I want users to find that document
> with a query for "two". This seems to work when I use
>
> 
>  maxGramSize="25" />
> 
>
> I got that one off google. The problem is I really want a search for "one"
> to be regarded as a better hit but seems the fragments created are like an
> equal word, or am I missing something? I also don't want those fragments to
> be a part of the spelling index...
>
> Feels like I am missing something on how to best configure wildcards in a
> word yet not affecting my index.
>
> Cheers
>



-- 
--

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: copyField based on value of another field

2015-06-23 Thread Alessandro Benedetti
You should work at the UpdateProcessor level :

https://wiki.apache.org/solr/UpdateRequestProcessor#Implementing_a_conditional_copyField

This should give you some hint.

Cheers

2015-06-23 13:45 GMT+01:00 Alistair Young :

> Hi folks,
>
> is it possible to copyField only if another field has a certain value? e.g.
>
> copyField 'dc.subject' to 'image_suggestions' only if rdf
> http://www.nsdl.org/ontologies/relationships#isInImageBank is true
>
> thanks,
>
> Alistair
>
> --
> mov eax,1
> mov ebx,0
> int 80h
>



-- 
--

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: Index time field boost with solrj?

2015-06-23 Thread Shawn Heisey
On 6/23/2015 4:42 AM, Karl Kildén wrote:
> Hello! Can I boost fields at index time with the solrj client? If not what
> do you recommend? Feels like it would be expensive to always do it at query
> time?

Yes.

On the SolrInputDocument class, there are addField and setField variants
that include a float parameter for boost:

http://lucene.apache.org/solr/5_2_0/solr-solrj/org/apache/solr/common/SolrInputDocument.html

Thanks,
Shawn



Re: Costume searchHandlers in a multi core envirment

2015-06-23 Thread Alessandro Benedetti
Let's start from this :
"I have a search handler I wrote that runs a sub query so that the main
query
I send to the SearchHandler is extended."

What is the problem you are searching to solve ?
Why a classic filter query or re-ranking query is not ok for you ?
Can you give us some indication of that ?

Cheers

2015-06-23 13:48 GMT+01:00 1234go1 <1234...@gmail.com>:

> Hi,
> I have a search handler I wrote that runs a sub query so that the main
> query
> I send to the SearchHandler is extended.
> This was working very nice till I changed my env to a be multi sharded.
> Now my searcher is always opened to the same core and not to the core that
> the shard asks for.
> For example:
> I have core1 & core2.
> my http request :
> localhost:8983/solr/core1/myselect?q=text%3Aabc&
> shards=http://localhost:8983/solr/core1%20http://localhost:8983/solr/core2
>
> I get to myselect handler twice but the searcher opens to core1 in both
> cases never to core2.
> Any ideas?
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Costume-searchHandlers-in-a-multi-core-envirment-tp4213436.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


Solr returning weird results

2015-06-23 Thread Freakheart
I am trying to set up Solr for my data, I have configured all the things and
the search seems to be working fine but some times I am getting weird
results.

For example if I am searching for a term 'vicryl ctx 2-0 70' in the results
I have

1. VICRYL VIOLETT GEFL | 2-0 | 1 x CTX PLUS | 1 x 70 | - | 36
2. VICRYL PLUS VIOLETT GEFL | 2-0 | 1 x CTX PLUS | 1 x 70 | - | 36
3. SPONGOSTAN* Film Gelatinehämostyptikum, 200 x 70 x 0,5 mm
4. SPONGOSTAN* Standard Gelatinehämostyptikum, 70 x 50 x 10 mm
5. SPONOGSTAN* Spezial Gelatinehämostyptikum, 70 x 50 x 1 mm
6. VICRYL VIOL GEFL VIOLETT GEFL | 2-0 | 1 x SH1 PLUS | 1 x 70 | - | 12

I don't understand why I am getting results no.4 and no.5 before no.6. I
looked at analysis and I found nothing wrong with that...

Below is my schema.xml


 


  
  


  



 


  
  


  


Any help or suggestions will be much appreciated..Thanks



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-returning-weird-results-tp4213467.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Nested objects and map in Solr

2015-06-23 Thread Amadeo Asco
I found the answer to my problems:

1. If you have sub-objects add "content_type": , to the parent 
object, e.g.
{
“name_s” : ”mine”,
"content_type": “surnames”,
values {
“surname1” : “first”,
“surname2” : “second"
}
}

2. Solr is very picky and will not index an object if it is not well construct 
(case of Json) or any of the object's fields don’t comply with their own type. 
Particularly I found it with the date/time, one of the valid formats is 
-MM-ddTHH:mm:ssZ, e.g. 2015-06-23T13:30:20Z

Hope this help someone else

> On 22 Jun 2015, at 18:45, Amadeo Asco  wrote:
> 
> Thank you for your reply.
> 
> Some of my objects are not fully indexed. I have 121 objects with sub-objects 
> and when querying with “*:*” only 81 are found. The objects are in Json 
> format. I use Solr from within Riak.
> 
> 
> On 22 Jun 2015, at 17:31, Alessandro Benedetti 
> mailto:benedetti.ale...@gmail.com>> wrote:
> 
> Join is not only query time related.
> Join is the Solr approach to nested documents.
> Block join and Query time join are 2 different strategies with different
> pros and cons .
> Basically :
> 
> Block Join :
> - force you to follow a specific indexing strategy
> - if you want to update a child you need to update the whole block ( parent
> +children)
> + 4-5 times faster then query time join
> 
> Query Time Join
> + you can index the data how you want, even in different cores
> + you can update single children
> - it is "slow"
> 
> What do you mean with "strange" indexes ?
> 
> Cheers
> 
> 2015-06-22 11:28 GMT+01:00 Amadeo Asco 
> mailto:a...@trifork.com>>:
> 
> I have looked at the join but the problem isn’t with the query but on
> indexing sub-objects (in some places called also nested objects). The best
> documentation I have seen is http://yonik.com/solr-4-8-features/
> but I am still getting very estrange indexes when I play with this
> approach and others.
> 
> Cheers
> 
> On 22 Jun 2015, at 11:23, Alessandro Benedetti 
> mailto:benedetti.ale...@gmail.com>
> > wrote:
> 
> I would suggest you to take a look to the Solr Join ( block and query time
> join) .
> This is what you are looking for.
> Anyway, this request points out that the documentation is not good enough
> to address people to Nested Objects problems.
> Maybe this should highlight the need of improving that part of the
> documentation.
> 
> Cheers
> 
> 2015-06-22 9:57 GMT+01:00 Amadeo Asco 
> mailto:a...@trifork.com> a...@trifork.com>>:
> 
> Dear all,
> 
> I am starting with Solr and I cannot index map(key,values) or nested
> objects in Solr. I have not been able to find a satisfactory answer online.
> Please could anyone let me know where to find the full documentation of how
> to index nested objects in Solr? Also how to index and reference in the
> search melees in a map?
> 
> Example Json:
> {"name_s":"Lion-o", "age_i":30, "leader_b":true, "data":{"name":"me",
> "surname":"other"}, "values_ss":["red", "blue”]}
> {"name_s":"Cheetara", "age_i":28, "leader_b":false, "content_type":
> "parentDocument",
> "_childDocuments_":[{"name":"1"},{"name":"2"},{"name":"3"}]}
> 
> What about with:
> {"name_s":"Lion-o", "age_i":30, "leader_b":true, "data":{"name”:[“me”],
> "surname”:[“other”, “next"]}, "values_ss":["red", "blue”]}
> 
> I look forward to hearing form you soon.
> 
> Thank you in advance,
> Amadeo
> 
> 
> 
> 
> --
> --
> 
> 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
> 
> 
> 
> 
> --
> --
> 
> 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: Solr returning weird results

2015-06-23 Thread Fadi Mohsen


Sent from my iPhone

> On 23 Jun 2015, at 16:37, Freakheart  wrote:
> 
> I am trying to set up Solr for my data, I have configured all the things and
> the search seems to be working fine but some times I am getting weird
> results.
> 
> For example if I am searching for a term 'vicryl ctx 2-0 70' in the results
> I have
> 
> 1. VICRYL VIOLETT GEFL | 2-0 | 1 x CTX PLUS | 1 x 70 | - | 36
> 2. VICRYL PLUS VIOLETT GEFL | 2-0 | 1 x CTX PLUS | 1 x 70 | - | 36
> 3. SPONGOSTAN* Film Gelatinehämostyptikum, 200 x 70 x 0,5 mm
> 4. SPONGOSTAN* Standard Gelatinehämostyptikum, 70 x 50 x 10 mm
> 5. SPONOGSTAN* Spezial Gelatinehämostyptikum, 70 x 50 x 1 mm
> 6. VICRYL VIOL GEFL VIOLETT GEFL | 2-0 | 1 x SH1 PLUS | 1 x 70 | - | 12
> 
> I don't understand why I am getting results no.4 and no.5 before no.6. I
> looked at analysis and I found nothing wrong with that...
> 
> Below is my schema.xml
> 
> positionIncrementGap="100">
> 
>
>
>  
>  
>
>
>  
> 
> 
>  positionIncrementGap="100">
> 
>
>
>  
>  
>
>
>  
> 
> 
> Any help or suggestions will be much appreciated..Thanks
> 
> 
> 
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Solr-returning-weird-results-tp4213467.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr returning weird results

2015-06-23 Thread Alessandro Benedetti
In this situations I would suggest you to use the DebugQuery=true.
To simplify the understanding you can also use : splainer.io .
Really nice tool to quickly identify why a document is there.

Cheers

2015-06-23 15:37 GMT+01:00 Freakheart :

> I am trying to set up Solr for my data, I have configured all the things
> and
> the search seems to be working fine but some times I am getting weird
> results.
>
> For example if I am searching for a term 'vicryl ctx 2-0 70' in the results
> I have
>
> 1. VICRYL VIOLETT GEFL | 2-0 | 1 x CTX PLUS | 1 x 70 | - | 36
> 2. VICRYL PLUS VIOLETT GEFL | 2-0 | 1 x CTX PLUS | 1 x 70 | - | 36
> 3. SPONGOSTAN* Film Gelatinehämostyptikum, 200 x 70 x 0,5 mm
> 4. SPONGOSTAN* Standard Gelatinehämostyptikum, 70 x 50 x 10 mm
> 5. SPONOGSTAN* Spezial Gelatinehämostyptikum, 70 x 50 x 1 mm
> 6. VICRYL VIOL GEFL VIOLETT GEFL | 2-0 | 1 x SH1 PLUS | 1 x 70 | - | 12
>
> I don't understand why I am getting results no.4 and no.5 before no.6. I
> looked at analysis and I found nothing wrong with that...
>
> Below is my schema.xml
>
>  positionIncrementGap="100">
>  
> 
> 
>   
>   
> 
> 
>   
> 
>
>  positionIncrementGap="100">
>  
> 
> 
>   
>   
> 
> 
>   
> 
>
> Any help or suggestions will be much appreciated..Thanks
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-returning-weird-results-tp4213467.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


"More" facets or "Less" facets in the Velocity UI

2015-06-23 Thread Sznajder ForMailingList
Hi

Is there a way to add a link "More" (or "Less") under the list of facet's
values, in aim to display more facets values?

Thanks!

Benjamin


Upgrading SolrCloud 4.8 to 4.8.1

2015-06-23 Thread Vincenzo D'Amore
Hi All,

I'm upgrading a SolrCluster from 4.8 to 4.8.1.
Looking at collections configuration there are few solrconfig.xml that have

LUCENE_48

others have:

4.8

Now I'm updating everything to:

4.8.1

Given that after the  change I have to reindex all the
collections.
In your experience, is there any other counter-indication?

Best regards,
Vincenzo

-- 
Vincenzo D'Amore
email: v.dam...@gmail.com
skype: free.dev
mobile: +39 349 8513251


Re: Upgrading SolrCloud 4.8 to 4.8.1

2015-06-23 Thread Shawn Heisey
On 6/23/2015 9:37 AM, Vincenzo D'Amore wrote:
> I'm upgrading a SolrCluster from 4.8 to 4.8.1.
> Looking at collections configuration there are few solrconfig.xml that have
>
> LUCENE_48
>
> others have:
>
> 4.8
>
> Now I'm updating everything to:
>
> 4.8.1

Changing your luceneMatchVersion is unnecessary.  We try to never make
changes in the API or Solr behavior in a bugfix release, unless it's
absolutely necessary to fix a bug.  To my knowledge, changes in API and
general behavior have NOT been required by any recent bugfix release. 
This means that a 4.8.1 match version will produce exactly the same
results as a 4.8 match version.  Changes in the index format are also
avoided, so you will not need to reindex.

The luceneMatchVersion code is capable of dealing with X.Y versions as
well as LUCENE_XY ... Starting with 4.9, it also understands LUCENE_X_Y
... which was a required addition because version 4.10 wouldn't have
worked with the LUCENE_XY notation.

Thanks,
Shawn



Re: Upgrading SolrCloud 4.8 to 4.8.1

2015-06-23 Thread Vincenzo D'Amore
Thank you very much Shawn, very interesting.
Is there any chance to find this behaviour explained in the wiki?

On Tue, Jun 23, 2015 at 6:02 PM, Shawn Heisey  wrote:

> On 6/23/2015 9:37 AM, Vincenzo D'Amore wrote:
> > I'm upgrading a SolrCluster from 4.8 to 4.8.1.
> > Looking at collections configuration there are few solrconfig.xml that
> have
> >
> > LUCENE_48
> >
> > others have:
> >
> > 4.8
> >
> > Now I'm updating everything to:
> >
> > 4.8.1
>
> Changing your luceneMatchVersion is unnecessary.  We try to never make
> changes in the API or Solr behavior in a bugfix release, unless it's
> absolutely necessary to fix a bug.  To my knowledge, changes in API and
> general behavior have NOT been required by any recent bugfix release.
> This means that a 4.8.1 match version will produce exactly the same
> results as a 4.8 match version.  Changes in the index format are also
> avoided, so you will not need to reindex.
>
> The luceneMatchVersion code is capable of dealing with X.Y versions as
> well as LUCENE_XY ... Starting with 4.9, it also understands LUCENE_X_Y
> ... which was a required addition because version 4.10 wouldn't have
> worked with the LUCENE_XY notation.
>
> Thanks,
> Shawn
>
>


-- 
Vincenzo D'Amore
email: v.dam...@gmail.com
skype: free.dev
mobile: +39 349 8513251


Re: "More" facets or "Less" facets in the Velocity UI

2015-06-23 Thread Alessandro Benedetti
This is strictly a front end "development" .
You need to modify the velocity template to provide that feature UI side .

Solr side you configure your facet.limit  ( on a per field basis if
necessary).
In the "browse" example it's in the appended params under the specific
request handler.

Cheers

2015-06-23 15:53 GMT+01:00 Sznajder ForMailingList :

> Hi
>
> Is there a way to add a link "More" (or "Less") under the list of facet's
> values, in aim to display more facets values?
>
> Thanks!
>
> Benjamin
>



-- 
--

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: Implicit Router Configurations

2015-06-23 Thread Erick Erickson
Please raise a JIRA for this, I can see why this would occur.
You can manually change the clusterstate.json file when this
happens as a stop-gap, I'd have all the Solr instances down
when doing this though.

Best,
Erick



On Tue, Jun 23, 2015 at 8:19 AM, Arnon Yogev  wrote:
> We have a use case where documents are indexed in shards according to a
> specific field (shard per user), and the number of shards is unknown when
> creating the collection.
> For that purpose we use the implicit router and define router.field=user.
>
> From what we've seen, the only way to define an implicit router is during
> the collection creation.
> Moreover, the router definitions (router.name and router.field) are kept
> only in clusterstate.json and not in any solr configuration file on disk.
>
> In some cases solr state becomes inconsistent and we need to delete the
> configs from ZK and restart the solr server. The behavior we see is the
> new clusterstate.json generated by solr on startup has the default
> router.name=compositeId, which is not what we defined during creation.
>
> Are we missing something? Is there a place to configure the implicit
> router on disk such that it will be persistent?
>
> Thanks,
> Arnon
>
>


Creating A User Interface On Top of Solr

2015-06-23 Thread Paden
Hello, 

I'm trying to custom build my own Solr interface in Visual Studios instead
of using/modifying the original Velocity interface. I'm mostly doing this as
a learning exercise for building UI that's why I'm opting out of using it. 

The problem is I'm pretty new and not sure where to begin. Most of the posts
I've seen end in people opting to modify the default UI. Are there any good
links to tutorials or good Solr classes I should look at as I'm trying to
build this UI? 

This interface isn't to replace the Solr Admin page, it's simply to handle
the querying of the indexed documents that I have. 

If this seems more an "exercise in futility" (due to vast amounts of code
that needs written or whatnot) then please let me know. I don't really have
any reason to believe it should be but I've been wrong before.

Thanks in advance 



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Creating-A-User-Interface-On-Top-of-Solr-tp4213541.html
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Creating A User Interface On Top of Solr

2015-06-23 Thread Erick Erickson
First, the Velocity UI was never intended to be a user-facing application, if
for no other reason than it has direct access to Solr. And I can delete all the
docs in the collection, delete collections, create new collections and
all manner
of other really bad stuff.

So almost _every_ application has its own UI for search.

You don't need to worry in the least about the Solr code base. You shouldn't
have to care. All you need to do is send HTTP requests to Solr and deal with
the response.

For instance, try these two commands from a browser:
http://sever:port/solr/collection/query?q=*:*
(that's star colon star in case your e-mail makes the colon just a bold).
http://sever:port/solr/collection/select?q=*:*

You should see a JSON and XML response packet. _That's_ all you
really have to deal with. The rest of theUI has nothing to do with
Solr and everything to do with your UI skills, you "merely" have to parse
the response and display it pleasingly.

If you don't want to curl the commands or use your own HTTP client, you
can use SolrJ to query Solr and not have to parse the response because
there are a bunch of helper methods that make navigating the response
easier, google "solrj query example" and you'll see a bunch of examples. Be
a little careful to make sure the example you use is compatible with your
Solr version.

HTH,
Erick

On Tue, Jun 23, 2015 at 5:20 PM, Paden  wrote:
> Hello,
>
> I'm trying to custom build my own Solr interface in Visual Studios instead
> of using/modifying the original Velocity interface. I'm mostly doing this as
> a learning exercise for building UI that's why I'm opting out of using it.
>
> The problem is I'm pretty new and not sure where to begin. Most of the posts
> I've seen end in people opting to modify the default UI. Are there any good
> links to tutorials or good Solr classes I should look at as I'm trying to
> build this UI?
>
> This interface isn't to replace the Solr Admin page, it's simply to handle
> the querying of the indexed documents that I have.
>
> If this seems more an "exercise in futility" (due to vast amounts of code
> that needs written or whatnot) then please let me know. I don't really have
> any reason to believe it should be but I've been wrong before.
>
> Thanks in advance
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Creating-A-User-Interface-On-Top-of-Solr-tp4213541.html
> Sent from the Solr - User mailing list archive at Nabble.com.


Re: Same query, inconsistent result in SolrCloud

2015-06-23 Thread Jerome Yang
Dear Erick,

Thank you, I fond it's the problem of my text segmentation setting.
Anyway, thanks.

Regards,
Jerome

2015-06-21 0:43 GMT+08:00 Erick Erickson :

> Just that this _shouldn't_ be going on at all. Either
> 1> you've done something when setting up this collection that's
>  producing this incorrect result
> or
> 2> you've found something really bad.
>
> So:
> 1> How did you create your collection? Did you use the Collections API
> or try to define individual cores with the Core Admin api? If the latter,
> you likely missed some innocent-seeming property on the core and your
> collection isn't correctly configured. Please do NOT use the "core admin
> API"
> in SolrCloud unless you know the code very, very well. Use the
> Collections API always.
>
> 2> Try querying each replica with &distrib=false. That'll return only the
> docs on the particular replica you fire the query at. Do you have
> replicas in the _same_ shard with different numbers of docs? If so,
> what can you see that's different about those cores?
>
> 3> What does your clusterstate.json file show?
>
> 4> how did you index documents?
>
> Best,
> Erick
>
> On Fri, Jun 19, 2015 at 8:07 PM, Jerome Yang 
> wrote:
> > Hi!
> >
> > I'm facing a problem.
> > I'm using SolrCloud 4.10.3, with 2 shards, each shard have 2 replicas.
> >
> > After index data to the collection, and run the same query,
> >
> > http://localhost:8983/solr/catalog/select?q=a&wt=json&indent=true
> >
> > Sometimes, it return the right,
> >
> > {
> >   "responseHeader":{
> > "status":0,
> > "QTime":19,
> > "params":{
> >   "indent":"true",
> >   "q":"a",
> >   "wt":"json"}},
> >   "response":{"numFound":5,"start":0,"maxScore":0.43969032,"docs":[
> >   {},{},...
> >
> > ]
> >
> >   }
> >
> > }
> >
> > But, when I re-run the same query, it return :
> >
> > {
> >   "responseHeader":{
> > "status":0,
> > "QTime":14,
> > "params":{
> >   "indent":"true",
> >   "q":"a",
> >   "wt":"json"}},
> >   "response":{"numFound":0,"start":0,"maxScore":0.0,"docs":[]
> >   },
> >   "highlighting":{}}
> >
> >
> > Just some short word will show this kind of problem.
> >
> > Do anyone know what's going on?
> >
> > Thanks
> >
> > Regards,
> >
> > Jerome
>


Re: Implicit Router Configurations

2015-06-23 Thread Arnon Yogev
Thank you Erick,

What is the recommended way to manually change clusterstate.json?
Is there a java code \ script way of editing a file in ZK?

Best,
Arnon



From:   Erick Erickson 
To: solr-user@lucene.apache.org
Date:   23/06/2015 09:09 PM
Subject:Re: Implicit Router Configurations



Please raise a JIRA for this, I can see why this would occur.
You can manually change the clusterstate.json file when this
happens as a stop-gap, I'd have all the Solr instances down
when doing this though.

Best,
Erick



On Tue, Jun 23, 2015 at 8:19 AM, Arnon Yogev  wrote:
> We have a use case where documents are indexed in shards according to a
> specific field (shard per user), and the number of shards is unknown 
when
> creating the collection.
> For that purpose we use the implicit router and define 
router.field=user.
>
> From what we've seen, the only way to define an implicit router is 
during
> the collection creation.
> Moreover, the router definitions (router.name and router.field) are kept
> only in clusterstate.json and not in any solr configuration file on 
disk.
>
> In some cases solr state becomes inconsistent and we need to delete the
> configs from ZK and restart the solr server. The behavior we see is the
> new clusterstate.json generated by solr on startup has the default
> router.name=compositeId, which is not what we defined during creation.
>
> Are we missing something? Is there a place to configure the implicit
> router on disk such that it will be persistent?
>
> Thanks,
> Arnon
>
>