Giter VIP home page Giter VIP logo

Comments (2)

bobend avatar bobend commented on June 27, 2024

I don't think the current stable version of solr support complex object or
lists of complex objects. Have you tried elastic search? (I have the same
problem, but I'm stuck with Solr at the moment).

Best regards
Bo Bendtsen
Den 14/12/2012 19.33 skrev "drmeph" [email protected]:

Hi folks,
I'm having trouble to import nested objects into solr. my mongodb object
has this form:

rs0:PRIMARY> x
{
"_id" : ObjectId("50c44df9058f6fe4cb69335e"),
"date" : ISODate("2012-12-09T05:00:00Z"),
"nid" : 3,
"sid" : 17411,
"siteRef" : "3-17411",
"total" : {
"a" : 311119,
"ab" : 248929,
"aw" : 4308,
"c" : 1.9857989999999885,
"r" : 0.2903688648648634
},
"web" : {
"a" : 311119,
"ab" : 248929,
"aw" : 4308,
"c" : 1.9857989999999885,
"r" : 0.2903688648648634
}
}

SEVERE: org.apache.solr.common.SolrException: ERROR:
[doc=50c44df9058f6fe4cb69335e] Error adding field 'total'='[a, c, ab, r,
aw]'

this is the error from solr... but it's only to highlight that solr see
"total" as an Array, but it's supposed to be a JSON Object.

Anyway about the schema.xml in Solr I put a bad parameter to raise an
error to show that structure.
But with the following configuration :

there is no error but the structures "web" "total" doesn't show up in solr


Reply to this email directly or view it on GitHubhttps://github.com//issues/14.

from mongo-connector.

tjj5036 avatar tjj5036 commented on June 27, 2024

Currently at the moment Solr doesn't support nested json. You can have lists though. So if you have something like:

In your schema.xml, you can do something like:

db.insert({'cat' : ['foo', 'bar']})

I think at the moment this is as close as you can get unfortunately. If this changes I will reopen the issue and add support.

from mongo-connector.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.