Giter VIP home page Giter VIP logo

Comments (2)

admtech avatar admtech commented on June 22, 2024 1

For example, we have these searches:

SELECT id, title, stamp_create, paradedb.rank_bm25(id) FROM content_search.search(
    query => paradedb.boolean(
            SHOULD => ARRAY[
                    paradedb.parse('title:"Proxmox routing"'),
                    paradedb.parse('title:Proxmox OR title:routing'),
                    paradedb.fuzzy_term(field => 'title', value => 'Proxmox routing')
            ],
            MUST => ARRAY[
                    paradedb.range(field => 'stamp_create', range => '["2010-01-01","2025-01-01"]'::daterange),
                    paradedb.term(field => 'topic_search',value => '965662248')
            ]
    ),
    limit_rows => 4
);

The result would be a total of 487 posts.

It would be easiest if you could just insert the value into the output when you need it, similar to "paradedb.rank_bm25(id)". For example: paradedb.found(). Then the counter is always displayed in the column, but I don't need a second query.

     id      |                             title                              |      stamp_create      | rank_bm25 | found
-------------+----------------------------------------------------------------+------------------------+-----------+-------
      309619 | Proxmox Routing funktioniert nicht                             | 2016-07-12 21:29:25+02 | 33.003704 |   487
      395928 | Proxmox VM zugrif auf Ports vom Host (Proxmox Routing)         | 2018-12-17 07:35:31+01 | 27.670732 |   487
      607986 | Routing Hetzner Proxmox Server klappt nicht                    | 2020-09-26 20:22:36+02 | 15.868061 |   487
  2573741832 | PfSense als VM unter Proxmox - IPv6 Routing funktioniert nicht | 2022-04-22 21:52:48+02 | 13.734482 |   487

Additional metadata would be ideal of course, but for now this simple solution with a field like "paradedb.found()" is enough for me.

from paradedb.

neilyio avatar neilyio commented on June 22, 2024

This is an interesting request, thanks for bringing it up. We don't have a standard interface yet for returning metadata about the search. This a little tricky to us being locked in to "table" results with Postgres, where ES can return a nested key-value object.

Could you give me an example query of how you would like this to work?

from paradedb.

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.