Searchable Plugin

allow constant meta data to be set in searchable closure

Details

  • Type: Sub-task Sub-task
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 0.4
  • Component/s: None
  • Labels:
    None

Activity

Hide
Maurice Nicholson added a comment -

So... Shay said: "is there an option to configure index, store, and all the different aspects you can with constant?"

Actually no. Perhaps I implemented this feature a little too hastily :-/

So what do you think we should do?

There is the obvious solution to just configure each constant as a Map with the same keys as Compass properties:

// only required attributes
constant name: "media", values: ["cassette", "disc"]

// required + optional attributes
constant name: "media", values: ["cassette", "disc"], index: "no", excludeFromAll: true, boost: 2.0

or we could keep the current idea and allow the optional attributes in a separate section:

// only required attributes
constant media: ["cassette", "disc"]

// required + optional attributes
constant media: ["cassette", "disc"], options: [index: "no", excludeFromAll: true, boost: 2.0]

But means "options" becomes a sort of reserved word.

I think the first, although more verbose, is the better because it's more explicit and consistent than the second.

Show
Maurice Nicholson added a comment - So... Shay said: "is there an option to configure index, store, and all the different aspects you can with constant?" Actually no. Perhaps I implemented this feature a little too hastily :-/ So what do you think we should do? There is the obvious solution to just configure each constant as a Map with the same keys as Compass properties:
// only required attributes
constant name: "media", values: ["cassette", "disc"]

// required + optional attributes
constant name: "media", values: ["cassette", "disc"], index: "no", excludeFromAll: true, boost: 2.0
or we could keep the current idea and allow the optional attributes in a separate section:
// only required attributes
constant media: ["cassette", "disc"]

// required + optional attributes
constant media: ["cassette", "disc"], options: [index: "no", excludeFromAll: true, boost: 2.0]
But means "options" becomes a sort of reserved word. I think the first, although more verbose, is the better because it's more explicit and consistent than the second.
Hide
Maurice Nicholson added a comment -

I've reimplemented this feature as per suggestion #1 above, so like:

constant name: "media", values: "cd-rom", index: 'un_tokenized'
Show
Maurice Nicholson added a comment - I've reimplemented this feature as per suggestion #1 above, so like:
constant name: "media", values: "cd-rom", index: 'un_tokenized'

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: