Skip to content

query search select columns from registered model #56

Description

@henryorton

Is it possible to search only within select columns of the registered model. Say you have:

@whooshee.register_model('title', 'content')
class Entry(db.Model):
    id = db.Column(db.Integer, primary_key=True)
    title = db.Column(db.String)
    content = db.Column(db.Text)

It would be great if I could only search content column by:

Entry.query.whooshee_search('chuck norris', fields=('content',)).all()

Or is it possible to do this by registering a custom woosheer? I can't quite figure out how to be able to search both 'title' and 'content', while also being able to search only 'title' or 'content' separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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