Comments (8)
They seem to work in limited testing done.
What I dont understand is the point of adding fields/attributes to the percolate index. Its specifally mentioned can reconfigure the index. But not sure why, or how to use it added fields
I initially thought it was so could additionally filter the queries in SELECT
(kinda like the buiult in tags column) but that doesnt seem to be the case.
The docs shows adding a json atgtribute. But HOW would you use it? Can use the extra fields/attributes in INSERT, in the SELECT, or in the CALL PQ? (dont know)
... just offering this as a part that dont think explained very well in the docs.
from manticoresearch.
btw, the blog post does appear to include an example. where the fields/attributes on the index, seem to be what can use in @field syntax
and Filters
on queries.
So is it that need to explicitly add fields/attributes to the index, BEFORE can INSERT
a query into the index, AND/OR before can run a CALL PQ
query (including the columns in the JSON 'document') ?
from manticoresearch.
You might use attributes to filter out some documents and fields to constrain query terms.
On INSERT
query got transformed to node tree and query field operators out of schema got dropped. However on index reconfigure all queries again got transformed to node tree from initial text representation.
Same for attributes. On issue matching with CALL PQ
attributes our of schema got dropped and attributes these not mention at CALL PQ
got their default values. Then on matching for query with filters document(s) got rejected in case it failed to pass query filters.
from manticoresearch.
the syntax is same as SphinxQL for @field
and filters
INSERT INTO pq_filter (query, filters) VALUES ( 'filter test', 'gid >= 10' );
INSERT INTO pq_filter (query, filters) VALUES ( 'filter test', 'gid >= 10 OR gid <= 3' );
CALL PQ ('pq_filter', ('{"title":"filter test doc1", "gid":2 }', '{"title":"filter test doc2", "gid":13}'), 1 as docs, 1 as docs_json );
from manticoresearch.
So the 'columns' used in CALL PQ
documents (title
and gid
- in your sample) - need to be defined as either field or attributes in the index itself. Thats the bit that not clear to me at least.
The text
field showing in a DESCRIBE pqindex
is just a single field, so that 0 AS docs_json
, a single string for the document is assigned a field name.
from manticoresearch.
I took example from test_321
there index declaration is
index pq_filter
{
type = percolate
path = data/pq_filter
rt_field = title
rt_attr_uint = gid
}
without docs_json
option you can not map documents to different fields as stated into documentation
Fields and attributes mapping are allowed for JSON documents only.
without docs_json
parser assigns fields from document with index schema defined order.
We implementing HTTP interface for PQ it will be json
based and no need to encode \ decode json objects into string as you have to with SphinxQL
from manticoresearch.
Note about Percolate Query preformance Manticoresearch vs. Elasticsearch
http://bit.ly/2nLSpqJ
from manticoresearch.
Done, thank you
from manticoresearch.
Related Issues (20)
- Convert Sphinx 3.3.1 Config to Latest Manticore Package with Plaintext Feature and Performance Optimization HOT 1
- About the failure of using logstash to synchronize mysql data to manticore HOT 16
- performance degradation with wildcard queries with many matches when disk_chunks > 1 HOT 12
- Разные названия типа поля в PQ таблице: multi - mva (multi64 - mva64 ) HOT 2
- HTTP JSON API - 2 Responses for a single request HOT 4
- Allow set columnar_no_fast_fetch option for RT table creation
- Auto-bootstrapping an all-down cluster HOT 6
- The command parser does not return an error for infix wrong string when creating a table. HOT 3
- Conversational Search (RAG) HOT 1
- String equal in JOIN HOT 6
- Update deps action is not working when it's called from the main branch HOT 1
- Crash with signal 11 when executing alter table command
- The parameter expansion_limit cannot be added to a real-time type table.
- Unable to kill default searchd HOT 6
- Freeze while inserting huge texts HOT 5
- Unable to update text field HOT 1
- Setting doc id inside 'doc' fails /bulk insert HOT 1
- forbid the mapping `U+any->U+0020`
- remove tabulation from the charset_table
- Complete Open API documentation
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 manticoresearch.