Re: Filter Facet Query

2017-04-17 Thread Furkan KAMACI
First problem is they do not match with main query. 18 Nis 2017 Sal, saat 01:54 tarihinde Dave şunu yazdı: > Min.count is what you're looking for to get non 0 facets > > > On Apr 17, 2017, at 6:51 PM, Furkan KAMACI > wrote: > > > > My

Re: Solr Child="true" flag in version 6.4

2017-04-17 Thread donjose
I am getting flat structure. Expected Result : { Category : "Shirt", CategoryId : 1 Categoryvalues : [ { id : 1, size : XL, color : red }, { id : 2, size : XL, color : blue } ] } Result i am getting: Categoryvalues : { id : 1,

Re: field with stored="false" is still stored

2017-04-17 Thread Maria Muslea
Thank you so much. This is the setting that I was missing. It is working as expected now. Maria On Mon, Apr 17, 2017 at 8:10 PM, Shawn Heisey wrote: > On 4/17/2017 4:40 PM, Maria Muslea wrote: > > I just upgraded to SOLR 6.4.1 from SOLR 4.10, and am having trouble with > >

Re: field with stored="false" is still stored

2017-04-17 Thread Maria Muslea
One additional detail. In the Schema view the field appears as "unstored field", which is what I want, but still it seems to be stored. Thank you for your help. Field: concept Field-Type:org.apache.solr.schema.StrFieldDocs:1

Re: field with stored="false" is still stored

2017-04-17 Thread Shawn Heisey
On 4/17/2017 4:40 PM, Maria Muslea wrote: > I just upgraded to SOLR 6.4.1 from SOLR 4.10, and am having trouble with > fields set as stored="false". > > I edited solrconfig.xml according to the documentation, so I could edit the > schema using schema api. > > >true >managed-schema > >

Re: field with stored="false" is still stored

2017-04-17 Thread Maria Muslea
Thank you for replying. While I did say "upgrade", I started with a "fresh" copy of Solr 6.4.1, I did not try to import anything from Solr 4. Once I saw that it isn't working as expected I only added one test document using SolrJ: SolrInputDocument p = new SolrInputDocument(); p.addField( "id",

Re: field with stored="false" is still stored

2017-04-17 Thread Zheng Lin Edwin Yeo
Hi Maria, >From what you mentioned, you have upgraded directly from Solr 4 to Solr 6. If I'm not wrong, I don't think we can upgrade the index with a direct jump of 2 version. Was the field set to stored="false" before you upgrade? Regards, Edwin On 18 April 2017 at 06:40, Maria Muslea

Re: Using BasicAuth with SolrJ Code

2017-04-17 Thread Zheng Lin Edwin Yeo
I'm using Solr 6.4.2. The JARs from SolrJ which I'm using are also from Solr 6.4.2. Regards, Edwin On 18 April 2017 at 08:05, Noble Paul wrote: > I tested this with the > > following code > > SolrRequest req = new QueryRequest(new SolrQuery("*:*"));//create a new >

Re: Using BasicAuth with SolrJ Code

2017-04-17 Thread Noble Paul
I tested this with the following code SolrRequest req = new QueryRequest(new SolrQuery("*:*"));//create a new req.setBasicAuthCredentials("solr", "SolrRocks"); client.setDefaultCollection(COLLECTION); NamedList res = cluster.getSolrClient().request(req); System.out.println("successful"+

Re: Filter Facet Query

2017-04-17 Thread Dave
Min.count is what you're looking for to get non 0 facets > On Apr 17, 2017, at 6:51 PM, Furkan KAMACI wrote: > > My query: > > /select?facet.field=research=on=content:test > > Q1) Facet returns research values with 0 counts which has a research value > that is not from

Filter Facet Query

2017-04-17 Thread Furkan KAMACI
My query: /select?facet.field=research=on=content:test Q1) Facet returns research values with 0 counts which has a research value that is not from a document matched by main query (content:test). Is that usual? Q2) I want to filter out research values with empty string ("") from facet result.

field with stored="false" is still stored

2017-04-17 Thread Maria Muslea
Hi, I just upgraded to SOLR 6.4.1 from SOLR 4.10, and am having trouble with fields set as stored="false". I edited solrconfig.xml according to the documentation, so I could edit the schema using schema api. true managed-schema I added a field using "Add Field" from the Schema GUI,

Re: Need help with Query Syntax

2017-04-17 Thread OTH
I tried that, but it returned no results. I understand now that the issue is that since the field has been tokenized - searching for "*san\ *" will try to search for individual tokens which contain the string sequence "san ", and so of course it won't find any. I think I've found another

Re: Need help with Query Syntax

2017-04-17 Thread Mikhail Khludnev
This can be done with escaping space select?q=field:*san\ * Probably sow=false in new version might also helo On Mon, Apr 17, 2017 at 4:42 PM, OTH wrote: > If I submit the query: > "select?q=field:*san*" > Then it works as expected; returning all values in the field

Re: Moving solr home

2017-04-17 Thread Susheel Kumar
Hi, Did you try to utilise the service installation scripts to deploy. This makes it very easy for Prod deployments and allows to decouple data/index directory with Solr binaries. See below link https://cwiki.apache.org/confluence/display/solr/Taking+Solr+to+Production Thanks, Susheel On Mon,

Re: Getting error while excuting full import

2017-04-17 Thread Mikhail Khludnev
Hello, Ankur, You probably can set clean=false=false and do clean in the controlling code. See https://cwiki.apache.org/confluence/display/solr/Uploading+Structured+Data+Store+Data+with+the+Data+Import+Handler One of thrilling DIH features is merging sorted children and parents with join="zipper"

Moving solr home

2017-04-17 Thread tedsolr
I have a solr cloud cluster (v5.2.1 on redhat linux) that uses the default location for solr home: (install dir)/server/solr. I would like to move the index data somewhere else to make upgrades easier. When I set a SOLR_HOME variable solr appears to be ignoring it - and even creating a solr.xml

Re: Solr Child="true" flag in version 6.4

2017-04-17 Thread Mikhail Khludnev
Hello, How do you index exactly? How do you query exactly? What do you get and how it differs from your expectation? On Mon, Apr 17, 2017 at 5:12 PM, donjose wrote: > Hello, > > I am facing an issue when i am trying to use child="true" in entity. > For example i

Re: Need help with Query Syntax

2017-04-17 Thread OTH
Ok. What analyzer / fieldtype should I use to be able to search across tokens? Basically, I'm just trying to replicate the functionality of the AnalyzingInfixLookupFactor Suggester, but I need to do it using a regular index, because I need to utilize multiple fields using edismax bq, which seems

Re: Need help with Query Syntax

2017-04-17 Thread Binoy Dalal
Use the analyser available in the solr admin console to find out exactly how your query is analysed. That should give you a lot more information. On Mon 17 Apr, 2017, 21:58 OTH, wrote: > Ok, I get it now, it's because the field has been indexed as tokens. So > maybe I

Re: Need help with Query Syntax

2017-04-17 Thread OTH
Ok, I get it now, it's because the field has been indexed as tokens. So maybe I should use a field which does not have a tokenizer index? I'll try something like that. Thanks On Mon, Apr 17, 2017 at 9:16 PM, OTH wrote: > The field type is "text_general". > > On Mon, Apr

Re: Need help with Query Syntax

2017-04-17 Thread OTH
The field type is "text_general". On Mon, Apr 17, 2017 at 7:15 PM, Binoy Dalal wrote: > I think it returns everything because your query matches *san or " *". > What is your field type definition? > > On Mon 17 Apr, 2017, 19:12 OTH, wrote: > > > If

Re: Getting error while excuting full import

2017-04-17 Thread Erick Erickson
I usually prefer SolrJ, here's an article explaining why and providing sample code. https://lucidworks.com/2012/02/14/indexing-with-solrj/ You can take the Tika bit out, they're unnecessary for importing from a DB. Best, Erick On Mon, Apr 17, 2017 at 5:45 AM, ankur.168

Re: Filter if Field Exists

2017-04-17 Thread Erik Hatcher
If you need to do an inner purely negative clause, it must be OR’d with *:* - queries about matching not excluding. There’s a shortcut in Solr to allow a top-level purely negative clause as convenience but when it gets nested it needs pairing explicitly. Those queries below don’t quite do

Re: Filter if Field Exists

2017-04-17 Thread Erik Hatcher
Too many ‘+’’s in there, I think. I think the query you want is this, and let’s be precise about the query parser here too in case that’s getting in the way and split this stuff up into separate reusable clauses: ?qq=test _no_type=({!field f=name v=$qq} -type:*)

Solr Child="true" flag in version 6.4

2017-04-17 Thread donjose
Hello, I am facing an issue when i am trying to use child="true" in entity. For example i am having some relational data in my DB. Please find the sample JSOn format below { Category : "Shirt", CategoryId : 1 Categoryvalues : [ { id : 1, size : XL, color : red }, { id : 2, size

Re: Filter if Field Exists

2017-04-17 Thread Furkan KAMACI
@Alexandre Rafalovitch, I could define empty string => "" as default value but than I do facet on that field too. I will need to filter empty strings from facet generation logic. By the way, which one is faster: either defining empty string as default value and appending (OR type:"") to queries

Re: Need help with Query Syntax

2017-04-17 Thread Binoy Dalal
I think it returns everything because your query matches *san or " *". What is your field type definition? On Mon 17 Apr, 2017, 19:12 OTH, wrote: > If I submit the query: > "select?q=field:*san*" > Then it works as expected; returning all values in the field which contain

Need help with Query Syntax

2017-04-17 Thread OTH
If I submit the query: "select?q=field:*san*" Then it works as expected; returning all values in the field which contain the string "san". However if I submit: "select?q=field:*san *" It then seems to return all the values of the field, regardless of what the value is (!) I only wish in this

Re: Getting error while excuting full import

2017-04-17 Thread ankur.168
Thanks for replying Shawn, There was an issue with the db connection url, silly mistake. I am facing one another problem, do not know if should post in the same thread or as a new post. Anyways posting here only, let me know if needs to be posted as new one. I am using DIH as you know. I have

Re: Filter if Field Exists

2017-04-17 Thread Furkan KAMACI
On the other hand, that query does not do what I want. On Mon, Apr 17, 2017 at 2:18 PM, Furkan KAMACI wrote: > Btw, what is the difference between > > +name:test +(type:research (*:* -type:[* TO *])) > > and > > +name:test +(type:research -type:[* TO *]) > > On Mon, Apr

Re: Filter if Field Exists

2017-04-17 Thread Furkan KAMACI
Btw, what is the difference between +name:test +(type:research (*:* -type:[* TO *])) and +name:test +(type:research -type:[* TO *]) On Mon, Apr 17, 2017 at 1:33 PM, Furkan KAMACI wrote: > Actually, amount of documents which have 'type' field is relatively too > small

Re: Filter if Field Exists

2017-04-17 Thread Furkan KAMACI
Actually, amount of documents which have 'type' field is relatively too small across all documents at index. On Mon, Apr 17, 2017 at 7:08 AM, Alexandre Rafalovitch wrote: > What about setting a default value for the field? That is probably > faster than negative search

Re: How to get field names of dynamic field

2017-04-17 Thread Alexandre Rafalovitch
Ugh. Ok, so if the list is different per-request, you should probably look at writing a custom search component if you want to keep it all in Solr layer. But really, you have middle-ware, right? Why don't you formulate your query with all the business requirement specifics in there. Regards,

Re: How to get field names of dynamic field

2017-04-17 Thread Midas A
Here if i am saying dynamic say *by_* *is the field then by_color, by_size .. etc . would be the dynamic fields . Regards, Abhishek Tiwari On Mon, Apr 17, 2017 at 1:47 PM, Midas A wrote: > Thanks alex, > > I want all dynamic fields related to a query( i.e. category_id :

Re: How to get field names of dynamic field

2017-04-17 Thread Midas A
Thanks alex, I want all dynamic fields related to a query( i.e. category_id : 199 where 199 category has around 1 docs) . How we can get this with help of luke Request handler. On Mon, Apr 17, 2017 at 1:39 PM, Alexandre Rafalovitch wrote: > You could externalize that

Re: How to get field names of dynamic field

2017-04-17 Thread Alexandre Rafalovitch
You could externalize that by periodically: 1) Running a luke query or Schema API to get the list of fields 2) Running Request Parameter API to update the list of field to return (this does not cause core reload) 3) If you have permanent field list on top of dynamic ones, you could use parameter

Re: How to get field names of dynamic field

2017-04-17 Thread Midas A
Can we do faceting for all fields created by dynamically created fields rather sending explicitly sending it by query will facet.fields=*by_* * work or any other alternate ?? I was thinking that i will get all dynamic fields with help of Luke handler . But probably it is not possible through luke