I am using OrientDB and I have a property name in Chinese.
How can I select this field ?
I think it's an issue :
You can create a field in Chinese but you can't select it.
I created a new issue here : https://github.com/orientechnologies/orientdb/issues/7506
Hope it helps
Related
i'm running show pool_nodes and it's work. What if i want to return just the 4th column(status), using only query. It is possible ? Thanks
If you are using pgpool-admin extension, then you can use SQL queries.
SELECT status FROM pcp_node_info()
Here is the documentation reference:
https://www.pgpool.net/docs/latest/en/html/pgpool-adm.html
I'd like to insert some annotations into work documents by using Java or Python. I tried POI, DOCX4J and python-docx. But unfortunately until now I didn't figure out how to use them to generate annotation in a word document.
Any advice would be much appreciated!
For docx4j, please see docx4j/samples/CommentsSample.java
I'm currently experimenting with sphinx realtime index. I inserted 4,5 millions documents.
Everything was working OK while my json meta attributes were like this:
{"result_type":"publications","publication_type":"essay"}
But yesterday, I wanted to add another value in 'publication_type' key and the json
resulted to:
{"result_type":"publications","publication_type":["essay","big_text"]}
Now I can't find document neither for 'essay', neither for 'big_text'.
The sphinxql query I'm using is like this:
select * from url where meta.publication_type='essay';
Sphinx version is Server version: 2.1.1-beta (rel21-r3701) running on Debian.
Hope you can help me. Is my json string wrong? Where is my mistake?
Thanks in advance.
SELECT *, ANY(x='essay' FOR x IN meta.publication_type) as p FROM url WHERE p=1;
Supported in 2.2.1-dev since r4217.
This was answered on the sphinx forum:
http://sphinxsearch.com/forum/view.html?id=11486
When store arrays, you access the values by index.
So could do
select * from url where meta.publication_type[0]='essay';
It doesnt appear to easy to search 'in any position'. So if essay was ever not the first index, it wouldnt work.
Note, I can't claim credit for figuring this out, just passing this information on.
I'm trying to implement a search functionnality with autocomplete in a project I'm working on. So far I've managed to do this with a select column1, column2 where myColumn like %...% but it isn't as responsive is I would like, I mean it's just ok and it searches only in one single row. The current version of MySql with innoDB tables doesn't support "match against" any plans on upgrading the db version? Otherwise, could anyone suggest another way of achieving a search + autocomp (against a single table).
Thanks!
Try www.rockitsearch.com , it has the autocomplete implementation. The only thing you'll need to do is :
- create an account
- export your data
How can I write a query with ormlite instead of using .create or any other thing like that? Can you please show me how for this simple example :
SELECT name FROM client
EDIT since I can't answer myself :
I guess I had to search a little more , anyway I found how to do it with the QueryBuilder like this :
newDao.query(newDao.queryBuilder().where.eq("name",valueofname)
If someone knows how to write the full query that would be great , otherwise , I'll stick with this solution
How can I write a query with ormlite instead of using .create or any other thing like that?
Goodness, there are tons of documentation about how to do this on the ORMLite site. Here's the section on the query builder.
I'm not sure what you mean by "full query" but your example will work with some tweaks:
List<...> results = newDao.queryBuilder().where().eq("name",valueofname).query();
It does not make sense to just return the name since the Dao hierarchy is designed to return the specific Client object. If you just want the name the you can specify the name column only to return:
... clientDao.queryBuilder().selectColumns("name").where()...
That will return a list of Client objects with just the name field (and the id field if it exists) extracted from the database.
If you just want the name strings then you can use the RawResults feature.