Skip to content

need to support WHERE / Index.Cond() #3

@steveyen

Description

@steveyen

An FTS Index that has type mappings is basically translatable, where each type mapping translates to another Index with a different WHERE or Index.Cond().

n1fty/index.go

Line 93 in 7b74840

// WHERE clause stuff, not supported

The idea, let's say I have an FTS index "myFTSIdx" on the beer-sample bucket that looks like...

  type: beer
      mapping of the beer fields
  type: brewery
      mapping of the brewery fields
  default:
      mapping of the fields that aren't "type" of beer nor brewery

So, that would get expressed as 3 different Indexes...

Index myFTSIdx-beer
   Cond() => "type = 'beer'"

Index myFTSIdx-brewery
   Cond() => "type = 'brewery'"

Index myFTSIdx-default
   Cond() => "type != 'beer' AND type != 'brewery'"

Also, better double-check with Sitaram that this is the correct expression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions