All Projects → FoundatioFx → Foundatio.parsers

FoundatioFx / Foundatio.parsers

Licence: apache-2.0
A lucene style query parser that is extensible and allows modifying the query.

Programming Languages

macros
77 projects

Projects that are alternatives of or similar to Foundatio.parsers

Lucenenet
Apache Lucene.NET
Stars: ✭ 1,704 (+4269.23%)
Mutual labels:  query, lucene
querqy-elasticsearch
Querqy for Elasticsearch
Stars: ✭ 37 (-5.13%)
Mutual labels:  query, lucene
Query Translator
Query Translator is a search query translator with AST representation
Stars: ✭ 165 (+323.08%)
Mutual labels:  query, elasticsearch
Elastiknn
Elasticsearch plugin for nearest neighbor search. Store vectors and run similarity search using exact and approximate algorithms.
Stars: ✭ 139 (+256.41%)
Mutual labels:  lucene, elasticsearch
Hibernate Search
Hibernate Search: full-text search for domain model
Stars: ✭ 382 (+879.49%)
Mutual labels:  lucene, elasticsearch
Code4java
Repository for my java projects.
Stars: ✭ 164 (+320.51%)
Mutual labels:  lucene, elasticsearch
Pegparser
💡 Build your own programming language! A C++17 PEG parser generator supporting parser combination, memoization, left-recursion and context-dependent grammars.
Stars: ✭ 164 (+320.51%)
Mutual labels:  peg, parse
Springboot Templates
springboot和dubbo、netty的集成,redis mongodb的nosql模板, kafka rocketmq rabbit的MQ模板, solr solrcloud elasticsearch查询引擎
Stars: ✭ 100 (+156.41%)
Mutual labels:  lucene, elasticsearch
Fast Elasticsearch Vector Scoring
Score documents using embedding-vectors dot-product or cosine-similarity with ES Lucene engine
Stars: ✭ 304 (+679.49%)
Mutual labels:  lucene, elasticsearch
rest-query-parser
Query Parser for REST
Stars: ✭ 29 (-25.64%)
Mutual labels:  query, parse
Elassandra
Elassandra = Elasticsearch + Apache Cassandra
Stars: ✭ 1,610 (+4028.21%)
Mutual labels:  lucene, elasticsearch
Fess
Fess is very powerful and easily deployable Enterprise Search Server.
Stars: ✭ 561 (+1338.46%)
Mutual labels:  lucene, elasticsearch
Luqum
A lucene query parser generating ElasticSearch queries and more !
Stars: ✭ 118 (+202.56%)
Mutual labels:  lucene, elasticsearch
Elasticsearch
Use SQL statements to query elasticsearch
Stars: ✭ 98 (+151.28%)
Mutual labels:  query, elasticsearch
Ik Analyzer
支持Lucene5/6/7/8+版本, 长期维护。
Stars: ✭ 112 (+187.18%)
Mutual labels:  lucene, elasticsearch
Termsql
Convert text from a file or from stdin into SQL table and query it instantly. Uses sqlite as backend. The idea is to make SQL into a tool on the command line or in scripts.
Stars: ✭ 230 (+489.74%)
Mutual labels:  parse, query
Vectorsinsearch
Dice.com repo to accompany the dice.com 'Vectors in Search' talk by Simon Hughes, from the Activate 2018 search conference, and the 'Searching with Vectors' talk from Haystack 2019 (US). Builds upon my conceptual search and semantic search work from 2015
Stars: ✭ 71 (+82.05%)
Mutual labels:  lucene, elasticsearch
lucene
Node.js lib to transform: lucene query → syntax tree → lucene query
Stars: ✭ 61 (+56.41%)
Mutual labels:  lucene, peg
Awesome Elasticsearch
A curated list of the most important and useful resources about elasticsearch: articles, videos, blogs, tips and tricks, use cases. All about Elasticsearch!
Stars: ✭ 4,168 (+10587.18%)
Mutual labels:  lucene, elasticsearch
Moqui Elasticsearch
Moqui Tool Component for ElasticSearch useful for scalable faceted text search, and analytics and reporting using aggregations and other great features
Stars: ✭ 10 (-74.36%)
Mutual labels:  lucene, elasticsearch

Foundatio

Build status NuGet Version feedz.io Discord

A lucene style query parser that is extensible and allows additional syntax features. Also includes an Elasticsearch query_string query replacement that greatly enhances its capabilities for dynamic queries.

Getting Started (Development)

This package can be installed via the NuGet package manager. If you need help, please contact us via in-app support or open an issue. We’re always here to help if you have any questions!

  1. You will need to have Visual Studio Code installed.
  2. Open the Foundatio.Parsers.sln Visual Studio solution file.

Using LuceneQueryParser

Below is a small sampling of the things you can accomplish with LuceneQueryParser, so check it out! We use this library extensively in Exceptionless!

In the sample below we will parse a query and output it's structure using the DebugQueryVisitor and then generate the same exact query using the parse result.

using Foundatio.Parsers.LuceneQueries;
using Foundatio.Parsers.LuceneQueries.Visitors;

var parser = new LuceneQueryParser();
var result = parser.Parse("field:[1 TO 2]");
Debug.WriteLine(DebugQueryVisitor.Run(result));

Here is the parse result as shown from the DebugQueryVisitor

Group:
  Left - Term: 
      TermMax: 2
      TermMin: 1
      MinInclusive: True
      MaxInclusive: True
      Field: 
          Name: field

Finally, lets translate the parse result back into the original query.

var generatedQuery = GenerateQueryVisitor.Run(result);
System.Diagnostics.Debug.Assert(query == generatedQuery);

Aggregation Syntax

Features

  • Lucene Query Syntax Parser
  • Field Aliases (static and dynamic)
  • Query Includes
    • Define stored queries that can be included inside other queries as macros that will be expanded
  • Validation
    • Validate query syntax
    • Restrict access to specific fields
    • Restrict the number of operations allowed
    • Restrict nesting depth
  • Elasticsearch
    • Elastic query string query replacement on steriods
    • Dynamic search and filter expressions
    • Dynamic aggregation expressions
      • Supported bucket aggregations: terms, geo grid, date histogram, numeric histogram
        • Bucket aggregations allow nesting other dynamic aggregations inside
      • Supported metric aggregations: min, max, avg, sum, stats, extended stats, cardinality, missing, percentiles
    • Dynamic sort expressions
    • Dynamic expressions can be exposed to end users to allow for custom searches, filters, sorting and aggregations
      • Enables allowing users to build custom views, charts and dashboards
      • Enables powerful APIs that allow users to do things you never thought of
    • Supports geo queries (proximity and radius)
      • mygeo:75044~75mi
        • Returns all documents that have a value in the mygeo field that is within a 75 mile radius of the 75044 zip code
    • Supports nested document mappings
    • Automatically resolves non-analyzed keyword sub-fields for sorting and aggregations
    • Aliases can be defined right on your NEST mappings
      • Supports both root and inner field name aliases

Thanks to all the people who have contributed

contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].