Comments (12)
cassandra field are case insensitive,
describe table flat3;
create your custom index like that :
CREATE CUSTOM INDEX flat3_index ON flat3 (lucene)
USING 'com.stratio.cassandra.lucene.Index'
WITH OPTIONS = {
'refresh_seconds' : '10',
'schema' : '{
fields : {
id : {type : "uuid"},
title : {type : "text"},
description : {type : "text"},
lastmodificationdate : {type : "date"}
}
}'
};
from cassandra-lucene-index.
Ok I forgot that, thanks. Also, I noticed, all indexed fields have to be set during insertion. Is there a way to insert rows with null columns, even if these columns are indexed? (it happens for a Longitude column, indexed as a part of a geopoint index)
from cassandra-lucene-index.
All single-field mappers allow null values, whereas multi-field mappers (geo_point, date_range and bitemporal) need all the fields to be present. However it seems a good idea to change this behavior. I think we could modify this kind of mappers to ignore rows with all columns with null value, e.g. ignore points with null latitude and null longitude. However, a row with a null latitude and a not null longitude should produce a failure. What do you think about this?
from cassandra-lucene-index.
Well, I would prefer if multi field mappers allow either:
- null values for all its fields
- or all its fields setted
In any other case (partially set fields), the mapper should produce a failure.
from cassandra-lucene-index.
The we agree. I will add this new behavior ASAP, probably this week. Thanks!
from cassandra-lucene-index.
This is great, thanks.
from cassandra-lucene-index.
Done! The changes are in master branch and they will be available in the next release.
from cassandra-lucene-index.
Hi
I am trying to do a case-insensitive search in stratio/lucene/cassandra.
Therefore, I created the index as below:
CREATE CUSTOM INDEX my_index ON my_table (lucene)
USING 'com.stratio.cassandra.lucene.Index.RowIndex'
WITH OPTIONS = {
'refresh_seconds' : '10',
'schema' : '{
fields : {
id : {type : "uuid"},
title : {type : "string", case_sensitive: false}
}
}'
};
However, if in my test instead of "TestTitle", I use "testTitle", it returns nothing.
I really appreciate if I get the information on how I can do a case_insensitive search.
from cassandra-lucene-index.
Hi
I am trying to do a case-insensitive search in stratio/lucene/cassandra.
Therefore, I created the index as below:
CREATE CUSTOM INDEX my_index ON my_table (lucene)
USING 'com.stratio.cassandra.lucene.Index.RowIndex'
WITH OPTIONS = {
'refresh_seconds' : '10',
'schema' : '{
fields : {
id : {type : "uuid"},
title : {type : "string", case_sensitive: false}
}
}'
};
However, if in my test instead of "TestTitle", I use "testTitle", it returns nothing.
I really appreciate if I get the information on how I can do a case_insensitive search.
from cassandra-lucene-index.
Hi @minauser,
Can you write down here the Keyspace creation, table creation and filter query please??
from cassandra-lucene-index.
Currently using 2.1.10 (Cassandra/Lucene)
CREATE CUSTOM INDEX my_index ON my_table (lucene)
USING 'com.stratio.cassandra.lucene.Index'
WITH OPTIONS = {
'refresh_seconds' : '10',
'schema' : '{
fields : {
id : {type : "uuid"},
name : {type : "string", case_sensitive: false}
}
}'
};
CREATE KEYSPACE IF NOT EXISTS my_keyspace WITH replication = {'class':'SimpleStrategy', 'replication_factor':1};
CREATE TABLE IF NOT EXISTS my_table(id uuid, name varchar, lucene TEXT, PRIMARY KEY(id)
INSERT INTO my_table(name, id) VALUES (“TestName”, "1c3d775f-d251-448f-9d51-5f3e0689ff0c") IF NOT EXISTS
SELECT name, id FROM my_table WHERE lucene = 'filter: { type: "match", field: "name", value: "TestName" }'
Returns 1 row BUT if I change the query to
SELECT name, id FROM my_table WHERE lucene = 'filter: { type: "match", field: "name", value: "testName" }'
Returns nothing!
from cassandra-lucene-index.
This will be answered at #62. @minauser, please don't copy-paste same message in three threads at a time, and don't mix your own issues with another not-related ones, specially if they are closed.
from cassandra-lucene-index.
Related Issues (20)
- Altering UDTs cause ArrayIndexOutOfBoundsException in ColumnsMapper HOT 14
- Unable to find custom indexer in Cassandra 3.11.2 HOT 1
- Support cassandra-3.11.3
- When a column from the index is used in a predicate cassandra always returns 0 records.
- ArrayIndexOutOfBounds with collections of UDTs HOT 2
- Request timeout error while retrieving data using Stratio-cassandra-lucene-index
- Can't retrieve Many records and count(*)
- Indexing Status
- Index text field as JSON HOT 2
- cassandra search - Returning the score of each result HOT 1
- Query maps where value is case_sensitive=false
- Support for Cassandra 4
- Custom Query
- Exception encountered during startup
- Upgrade to JTS 1.16.1
- Lucene Index Empty after upgrade
- Lucene Index with Cassandra SSL
- Another CQL "date" type: No results
- JVM segfault in ~StubRoutines::updateBytesCRC32 during commit() HOT 1
- Cassandra secondary lucene index rebuild is very slowly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cassandra-lucene-index.