cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell Bradberry <rbradbe...@gmail.com>
Subject Re: Cassandra DSE Solr - search JSON content in column
Date Wed, 13 Jan 2016 15:01:08 GMT
You can use the full text wildcard search as mentioned. However, if you need something more
specific like certain fields in the JSON indexed, you can use DSE SOLR field transformers.
 http://www.datastax.com/dev/blog/dse-field-transformers

From:  DuyHai Doan <doanduyhai@gmail.com>
Reply-To:  <user@cassandra.apache.org>
Date:  Wednesday, January 13, 2016 at 9:10 AM
To:  <user@cassandra.apache.org>
Subject:  Re: Cassandra DSE Solr - search JSON content in column

Try

SELECT * FROM your_table WHERE solr_query='json:"*100 ABC Street*"'; 

Warning: since you're storing in JSON format, searching data inside a JSON is equivalent to
a wildcard seach *xxx* and it is quite expensive, even for full text search engines like Solr

On Wed, Jan 13, 2016 at 2:50 PM, Joseph Tech <jaalex.tech@gmail.com> wrote:
Hi,

Is it possible in DSE Cassandra Solr to search for JSON content within a column? 
We store a complex JSON in a column of type "text", very simplified version below.

{
"userId": "user100",
"addressList": [{
"addressId": "100",
"address": "100 ABC Street"
}],
"userName": "user11"
}

In this, can search return all records that have address="100 ABC Street" ? 

Thanks,
Joseph




Mime
View raw message