1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/source3/rpc_server/mdssvc
Ralph Boehme 8e3372ecea mdssvc: add options to allow ignoring attribute and type mapping errors
This adds two options that are used by the Spotlight query parser to optionally
ignore unknown attributes or types in a query.

    elasticsearch:ignore unknown attribute = yes | no (default: no)
    elasticsearch:ignore unknown type = yes | no (default: no)

Example Spotlight query with unknown attributes and type:

    kMDItemContentType=="public.calendar-event"||kMDItemSubject=="Kalender*"cdw||
    kMDItemTitle=="Kalender*"cdw||kMDItemTopic=="Kalender*"cdw||
    kMDItemTextContent=="Kalender*"cd||*=="Kalender*"cdw||
    kMDItemTextContent=="Kalender*"cdw

The unknown attributes are "kMDItemTopic" and "kMDItemSubject". The unkown type
is "public.calendar-event".

Currently the parser will outright fail to parse the query and the search will
enter an error state.

To give users some control over the mapping the above options can be used to
tell the parser to simply ignore such unknown attributes and types.

  (meta.title:Kalender* OR content:Kalender* OR Kalender* OR content:Kalender*)

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
2021-10-14 09:33:38 +00:00
..
dalloc.c mdssvc: Slightly simplify dalloc_size() 2020-10-02 21:30:33 +00:00
dalloc.h s3:mdssvc: mds_dalloc_dump() -> dalloc_dump() 2019-08-08 20:24:31 +00:00
elasticsearch_mappings.json s3:mdssvc: add Elasticsearch backend 2019-10-09 14:35:29 +00:00
es_lexer.l s3:mdssvc: add Elasticsearch backend 2019-10-09 14:35:29 +00:00
es_mapping.c mdssvc: prepare for ignore attribute and type mapping errors 2021-10-14 09:33:38 +00:00
es_mapping.h s3:mdssvc: add Elasticsearch backend 2019-10-09 14:35:29 +00:00
es_parser_test.c s3:mdssvc: make use of lp_parm_const_string() 2019-11-27 10:25:31 +00:00
es_parser.y mdssvc: add options to allow ignoring attribute and type mapping errors 2021-10-14 09:33:38 +00:00
marshalling.c s3:mdssvc: fix unmarshalling of empty CNID array 2019-08-08 20:24:32 +00:00
marshalling.h s3-mdssvc: (un)marshalling Spotlight RPC blob 2015-07-07 17:34:28 +02:00
mdssvc_es.c s3:mdssvc: make use of lp_parm_const_string() 2019-11-27 10:25:31 +00:00
mdssvc_es.h s3:mdssvc: add Elasticsearch backend 2019-10-09 14:35:29 +00:00
mdssvc_noindex.c s3:mdssvc: add noindex backend 2019-08-08 20:24:32 +00:00
mdssvc_noindex.h s3:mdssvc: add noindex backend 2019-08-08 20:24:32 +00:00
mdssvc_tracker.c s3-mdssvc: factor out Tracker backend logic 2019-08-08 20:24:31 +00:00
mdssvc_tracker.h s3-mdssvc: factor out Tracker backend logic 2019-08-08 20:24:31 +00:00
mdssvc.c s3: mdssvc: Correctly disconnect the VFS connection inside the mds_ctx destructor. 2021-08-25 16:22:37 +00:00
mdssvc.h mdssvc: maintain a connection struct in the mds_ctx 2021-06-16 05:08:29 +00:00
README s3-mdssvc: lexer and parser for Spotlight queries 2015-07-07 17:34:28 +02:00
sparql_lexer.l s3:mdssvc: fix flex compilation error 2019-05-28 11:49:06 +00:00
sparql_mapping.c s3/rpc_server/mdssvc: add attribute "kMDItemContentType" 2017-02-15 06:20:52 +01:00
sparql_mapping.h s3-mdssvc: Spotlight attribute mappings 2015-07-07 17:34:28 +02:00
sparql_parser_test.c s3-mdssvc: factor out Tracker backend logic 2019-08-08 20:24:31 +00:00
sparql_parser.y s3-mdssvc: factor out Tracker backend logic 2019-08-08 20:24:31 +00:00
srv_mdssvc_nt.c mdssvc: Use ndr_policy_handle_empty() 2021-09-25 00:46:23 +00:00
srv_mdssvc_nt.h s3-mdssvc: main Spotlight code 2015-07-07 17:34:28 +02:00
test_mdsparser_es.c selftest: add a test ignored spotlight/elasticsearch mapping failures 2021-10-14 09:33:38 +00:00

Introduction:
=============
This directory contains source code for the metadata search service
aka Spotlight.

Bison and flex:
===============
Not yet integrated into the waf buildsystem, run these by hand:

$ bison -d -o sparql_parser.c sparql_parser.y
$ flex -o sparql_lexer.c sparql_lexer.l

or use the bundled Makefile.