Giter Club home page Giter Club logo

Comments (6)

marien-probesys avatar marien-probesys commented on August 26, 2024

Related to #8

from bileto.

marien-probesys avatar marien-probesys commented on August 26, 2024

From #8

I'd like the filters and the fulltext search to be handled internally through a search syntax, such as GitHub (https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax et https://docs.github.com/fr/search-github/searching-on-github/searching-issues-and-pull-requests). It would be easily parsable to extract filters and to adapt the interface, while being stringified and passed in the URL.

I have some code in one of my own projects of a search syntax, parser and engine (not tied to Symfony): flusio/Flus@main...new/search (I decided to use a simpler approach, i.e. PostgreSQL full text search)


An option that I'd like to add is the possibility to display the tickets of the sub-organizations. I would prefer to implement that once the "search syntax" is working.

from bileto.

marien-probesys avatar marien-probesys commented on August 26, 2024

Examples of (advanced) searches:

emails evil corp

emails evil corp type:incident

emails evil corp type:incident priority:high

emails evil -priority:high

emails (requester:abcde OR assignee:abcde)

emails ("evil corp" OR (priority:high,low impact:medium))

emails NOT "evil corp"

emails OR NOT "evil corp"

emails created:2023-03-26T12:00/PT1H

emails created:>=2023-03-26T12:00

emails created:today

emails -created:today

emails NOT created:today

#42

email evil corp no:assignee

assignee:@me type:request

emails org:abcde

emails org:abcde suborg:true

By default, it is assumed that terms are separated by ANDs

Actual views correspond to these searches:

  • all tickets: status:open
  • not assigned: status:open no:assignee
  • your tickets: status:open involves:@me

involves:X is an alias for (assignee:X OR requester:X)

When in an organization, AND org:abcde is appended.

When listing tickets globally, the following is appended:

AND (
    org:[list of orga uids with "view all" access]
    OR (org:[list of orga uids with "view" access] AND involves:@me)
)

from bileto.

marien-probesys avatar marien-probesys commented on August 26, 2024

Here is the list of tokens of the query parser:

  • qualifier ([\w\-_]+:, ex. type:)
  • and and or (AND and OR, AND is implicit between tokens if not specified)
  • not (NOT)
  • open_bracket and close_bracket (( and ))
  • comma (,)
  • id (#[\d]+)
  • text (e.g. text or "some text")

The backslash character (\) is used to escape the next character (:, ", \, (, ), ,, -)

from bileto.

marien-probesys avatar marien-probesys commented on August 26, 2024

The LL grammar is defined by the following rules (note that I'm far from being an expert):

S -> QUERY
 
QUERY -> CONDITIONAL_QUERY
QUERY -> CONDITIONAL_QUERY QUERY
QUERY -> CONDITIONAL_QUERY end_of_query

CONDITIONAL_QUERY -> or CONDITION
CONDITIONAL_QUERY -> and CONDITION

CONDITION -> CRITERIA
CONDITION -> not CRITERIA

CRITERIA -> TEXT_OR_LIST
CRITERIA -> qualifier TEXT_OR_LIST
CRITERIA -> id
CRITERIA -> open_bracket QUERY close_bracket

TEXT_OR_LIST -> text
TEXT_OR_LIST -> text comma TEXT_OR_LIST

from bileto.

marien-probesys avatar marien-probesys commented on August 26, 2024

The search engine is merged 🎉 There are two main limits for now:

  • the full-text search is only done on tickets titles (not on messages)
  • it is not possible to search on dates

This will be done later.

from bileto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.