[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Any package for boolean search?
From: |
Jean Louis |
Subject: |
Re: Any package for boolean search? |
Date: |
Sat, 28 Dec 2024 19:20:38 +0300 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
* Joel Reicher <joel.reicher@gmail.com> [2024-12-28 19:08]:
> Solving a search query is an eval, but I think you are saying you want to
> avoid code injection which is fair enough.
Search query is just a string I receive so parsing the string for OR
will be my first development.
> Off the top of my head you can map over the sexpr returned by read and
> rewrite the symbols to ones you control before evaling.
I understand that approach, and I understand there would be way to
allow only some symbols, though I assure you that reading the sexp is
not needed. Generally I do a lot of evals in my documents. I find the
feature fantastic. I am using it for template interpolation.
RCD Template Interpolation System for Emacs:
https://hyperscope.link/3/7/1/3/3/RCD-Template-Interpolation-System-for-Emacs.html
Though for website search it will be string parsing on chunks of
different types of queries.
> In my opinion it is still worth avoiding a parse, which is what Lisp can
> give you.
1. First stage of development
- treat it as exact, collect IDs
- allow 1-2 Levenshtein difference,
-- Function: string-distance string1 string2 &optional bytecompare
This function returns the “Levenshtein distance” between the source
string STRING1 and the target string STRING2. The Levenshtein
- get 5-10 pages where both or more words of the query, which are
not stop words, appear apart from each other, unless user quoted
the query
2. Second stage
- recognize if there is any OR
--
Jean Louis
- Any package for boolean search?, Jean Louis, 2024/12/25
- RE: [External] : Any package for boolean search?, Drew Adams, 2024/12/25
- Re: Any package for boolean search?, Joel Reicher, 2024/12/26
- Re: Any package for boolean search?, Jean Louis, 2024/12/26
- Re: Any package for boolean search?, Joel Reicher, 2024/12/26
- Re: Any package for boolean search?, Jean Louis, 2024/12/27
- Re: Any package for boolean search?, Joel Reicher, 2024/12/27
- Re: Any package for boolean search?, Jean Louis, 2024/12/28
- Re: Any package for boolean search?, Joel Reicher, 2024/12/28
- Re: Any package for boolean search?,
Jean Louis <=
Re: Any package for boolean search?, Jean Louis, 2024/12/26