Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalizzazione contenuti su ES #8

Open
mwithi opened this issue Oct 31, 2024 · 0 comments
Open

Normalizzazione contenuti su ES #8

mwithi opened this issue Oct 31, 2024 · 0 comments

Comments

@mwithi
Copy link
Member

mwithi commented Oct 31, 2024

Allineare la radice del contenuto in ES tra data e comment, in modo da semplificare questo tipo di ricerche:

const filter = {
        index,
        body: {
          size: 100,
          query: {
            bool: {
              must: [
                {
                  range: {
                    [index === "twits"
                      ? "data.timestamp"
                      : "comment.timestamp"]: {
                      gte: startDate.getTime(),
                    },
                  },
                },
                {
                  exists: {
                    field:
                      index === "twits"
                        ? "data.prediction"
                        : "comment.prediction",
                  },
                },
              ],
            },
          },
        },
      };

Verificare anche il publishAt che c'è su YouTube e Twitch ed il createdAt che c'è invece su Twitter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant