solr nested schema

2018-07-14 Thread sara hajili
hi
i need add nested document in solr . how can i do this ?
how add nested document field in schema ?
for example i need to add this :
{
  "id":12,
   'topic":[ {
   code:1,
name:"hi"
},
{
code:2,
 name:"hi"
}
  ]
}


Re: solr nested schema

2018-07-14 Thread Andrea Gazzarini
Hi,
Please expand a bit your needs, because the answer to your question could
be different.

Specifically: is that nesting needed only for visualization purposes? Could
you please expand your access pattern (i.e. queries requirements)?

Even if Solr supports nested documents (just google "Solr nested
documents") , depending on the answers above, it could be something that
you don't need.

Best,
Andrea

Il sab 14 lug 2018, 13:27 sara hajili  ha scritto:

> hi
> i need add nested document in solr . how can i do this ?
> how add nested document field in schema ?
> for example i need to add this :
> {
>   "id":12,
>'topic":[ {
>code:1,
> name:"hi"
> },
> {
> code:2,
>  name:"hi"
> }
>   ]
> }
>


Re: solr nested schema

2018-07-14 Thread sara hajili
i need to have nested object to solr document , and query in nested objects
and children. i create this schema :
  
 and add this doc :
{
"id":12,
"topic":{"code":12,"name":"hi"}
}

this file added completly but have a probelm in search. i didn't get any
result when is search : "topic.code:12"
i didn't get any result from solr.
what is my problem?
schema? adding doc ? or query ?
On Sat, Jul 14, 2018 at 4:24 PM Andrea Gazzarini 
wrote:

> Hi,
> Please expand a bit your needs, because the answer to your question could
> be different.
>
> Specifically: is that nesting needed only for visualization purposes? Could
> you please expand your access pattern (i.e. queries requirements)?
>
> Even if Solr supports nested documents (just google "Solr nested
> documents") , depending on the answers above, it could be something that
> you don't need.
>
> Best,
> Andrea
>
> Il sab 14 lug 2018, 13:27 sara hajili  ha scritto:
>
> > hi
> > i need add nested document in solr . how can i do this ?
> > how add nested document field in schema ?
> > for example i need to add this :
> > {
> >   "id":12,
> >'topic":[ {
> >code:1,
> > name:"hi"
> > },
> > {
> > code:2,
> >  name:"hi"
> > }
> >   ]
> > }
> >
>


Re: MetricRegistry instances for transient cores are not getting GC'd

2018-07-14 Thread nandakishorek
This is a duplicate of https://issues.apache.org/jira/browse/SOLR-11882.
The problem is fixed in 7.4.



--
Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html


Re: solr nested schema

2018-07-14 Thread Shawn Heisey

On 7/14/2018 6:46 AM, sara hajili wrote:

i need to have nested object to solr document , and query in nested objects
and children. i create this schema :
  
  and add this doc :
{
"id":12,
"topic":{"code":12,"name":"hi"}
}

this file added completly but have a probelm in search. i didn't get any
result when is search : "topic.code:12"
i didn't get any result from solr.


Parent/Child document support doesn't work that way.

It seems that what you actually want is to send a nested structure and 
have Solr parse a complex field definition into multiple fields.  Solr 
isn't going to do this for you.  You'll need to handle this in your 
indexing application.  When your application gets results from Solr, it 
can recreate the nested structure to show to the user.


A child document is a completely separate document.  That document has a 
field which links it to another document that gets indexed at the same 
time -- its parent.


I have no idea what Solr would do when indexing the json that you sent 
it.  As you've noticed, it doesn't do what you expected.


Thanks,
Shawn