Searching object with Lucene

33 views
Skip to first unread message

Nelson Souza

unread,
May 21, 2021, 7:46:12 AM5/21/21
to RavenDB - an awesome database
Hey there

In this scenario, how can I to search for specific property value using lucene?

thanks

Capture.PNG

lucene("ShipTo.Teste.Campo.abc[].id", "3")  = is ok

Capture2.PNG

lucene("ShipTo.Teste.Campo.abc[].campo", "abc4444") = not ok

Capture3.PNG

Grisha Kotler

unread,
May 26, 2021, 6:25:26 AM5/26/21
to rav...@googlegroups.com
Hi Nelson,

from Orders
where lucene(Lines[].ProductName, "Chowder")

Works on the sample data.

Can you share the database?

Grisha Kotler
Team Leader   /   Hibernating Rhinos LTD
Skype:  grisha.kotler
Support:  sup...@ravendb.net
  


--
You received this message because you are subscribed to the Google Groups "RavenDB - an awesome database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ravendb/3e560770-d22b-4282-bd8e-5d120e3cc1ddn%40googlegroups.com.

Grisha Kotler

unread,
May 26, 2021, 6:34:04 AM5/26/21
to rav...@googlegroups.com
https://issues.hibernatingrhinos.com/issue/RavenDB-16757

Please delete the auto-generated index.

You shouldn't use quotes in the field name:
lucene(ShipTo.Teste.Campo.abc[].campo, "abc4444")


Grisha Kotler
Team Leader   /   Hibernating Rhinos LTD
Skype:  grisha.kotler
Support:  sup...@ravendb.net
  

Nelson Souza

unread,
Sep 17, 2021, 7:05:54 AM9/17/21
to RavenDB - an awesome database
Hi Grisha, I tried search with the lucene filter in this mode and doesn't work. What is wrong?

{
            "Root": [
                {
                    "Root1": [
                        {
                            "Root2": [
                                {
                                    "Code": "100",
                                    "Name": "test"
                                }
                            ]
                        }
                    ]
                }
            ]
   }

from Demo
where lucene(Root[].Root1[].Root2[].Code, "100")

thanks





Oren Eini (Ayende Rahien)

unread,
Sep 17, 2021, 7:15:33 AM9/17/21
to ravendb
Are you sure that you are using the right collection, I tried your query and got the result.



--
Oren Eini
CEO   /   Hibernating Rhinos LTD
Skype:  ayenderahien
Support:  sup...@ravendb.net
  

Nelson Souza

unread,
Sep 20, 2021, 6:11:40 AM9/20/21
to RavenDB - an awesome database
Yes, I removed my last index and it works. Thanks!
Reply all
Reply to author
Forward
0 new messages