Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Is the address field searchable? #66

Closed
geenious opened this issue Dec 8, 2020 · 2 comments
Closed

Is the address field searchable? #66

geenious opened this issue Dec 8, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@geenious
Copy link

geenious commented Dec 8, 2020

I'm making a simple query:

{% set query = craft.app.request.getParam('q') %}
{% set results = craft.entries({
  search: query,
  limit: 10,
  orderBy: 'score',
}) %}

But the entry isn't showing when I search by the value in Address Field 1.

The "Use this field’s values as search keywords" is checked and I've re-saved all entries.

@lindseydiloreto
Copy link
Contributor

Hi @geenious,

I don't believe the Address field gets indexed in the search index. The data exists outside of the content table, and would probably require some special magic to get properly indexed.

In the meantime, there are other (more preferred) ways of accessing the Address data. The most common way to is to perform a normal proximity search. Or if you're just looking for a direct string match, check out filtering entries by subfield value.

I'm not sure if it's even possible to get the Address fields included in the search index, but I can run it past P&T to get their thoughts. It's pretty low on my radar though, and unlikely to happen in the near future... I can leave this thread open as a feature request until I do eventually get around to it.

Hope that helps! 🙂

@lindseydiloreto
Copy link
Contributor

This issue has been migrated to the Google Maps repo. To stay up-to-date, subscribe over there...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants