I have fetching records from SphinxQl . Here i have to be find out howmany sphinxQL querys coming to server. As the same i have to be know any options is there to add comments in sphinxQl query. Please help me to findout the solutions.
... OPTION comment='This is a comment to be entered in the log file'
From the documentation:
http://sphinxsearch.com/docs/current.html#sphinxql-reference
(to complete, but the other answer is more linked to your problem)
with SphinxSE
WHERE query="(....);comment=This is a comment to be entered in the log file"
Related
In pg_stat_statements output ("query" field):
SELECT * FROM users WHERE id = ?
How can I get the details of "?" from query in pg_stat_statements?
Can anybody tell me about this, because I want to track if anyone execute some query.
Can we also know which ip address this query execute from? so I can monitor if anyone make some modification data in database.
Thanks for the help.
You can use pg_stat_monitor, it has that feature.
Is it possible to push down comments to the source database query?
Given example Teiid query:
select /* 'request_id' */ columnA, sum(columnB)
from tableA
I'd like to see the comment pushed down to the source database so that I can capture the request_id in the logs. I've looked at source hints, but have not had any luck getting those pushed down to the source query either.
See http://teiid.github.io/teiid-documents/master/content/reference/JDBC_Translators.html and search for UseCommentsInSourceQuery
nxlog.conf
The above link is to a copy of my nxlog.conf. I couldn't find any documentation about how to use multiple blocks within a querylist block, but based on the name I assumed that I would be able to do this. My ELK server is receiving ALL events right now, not any of the filtered ones. I wanted to just use one query block but it is limited to 10 select entries. I can't find any examples of people using more than like 3 select entries. Has anyone had any luck with more advance nxlog.conf's? Any help would be appreciated.
Not sure what the issue with the query xml is. If there is a limitation on the number of select entries, that's coming from the Windows Eventlog API so that cannot be helped.
On the other hand you can use nxlog's native filtering using drop():
Query <QueryList>\
<Query Id="0">\
<Select Path="Security">*</Select>\
</Query>\
</QueryList>
Exec if not ($EventID == 1 or $EventID == 2 or ...) drop();
actually there is no issue with the XML. I was viewing old results in my database from when I was testing nxlog.conf with no queries. My bad!
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.
We use Sphinx Search at work but and I am having an issue with a new index I'm setting up. Does anyone know of a tool or technique that so I can look at the data stored in Sphinx?
Basically I want to do something like - "show me the first 5 records in index 'X'", just to be sure that it is actually storing data. At the moment I'm about 90% sure that my query code is correct but have no way of knowing that my index is correct.
Cheers
*SELECT * FROM index_name* on Sphinx side should give you a list of IDs. This required MySQL protocol support to be enabled in Sphinx conf file:
listen = 9306:mysql41
To Find Ids in index, you can do this:
/usr/local/sphinx/bin/indextool -c /usr/local/sphinx/etc/sphinx.conf --dumpdocids indexname