diff --git a/.cargo/config.toml.in b/.cargo/config.toml.in index cd5b5f1a63bc..f61deb117a98 100644 --- a/.cargo/config.toml.in +++ b/.cargo/config.toml.in @@ -70,9 +70,9 @@ git = "https://github.com/jfkthame/mapped_hyph.git" rev = "eff105f6ad7ec9b79816cfc1985a28e5340ad14b" replace-with = "vendored-sources" -[source."git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217"] +[source."git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f"] git = "https://github.com/mozilla/application-services" -rev = "6a007c98292fa72965d36389ce32d7609e399217" +rev = "e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" replace-with = "vendored-sources" [source."git+https://github.com/mozilla/audioipc?rev=e6f44a2bd1e57d11dfc737632a9e849077632330"] diff --git a/Cargo.lock b/Cargo.lock index 12d1c7115757..540a414f33f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1792,7 +1792,7 @@ dependencies = [ [[package]] name = "error-support" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "error-support-macros", "lazy_static", @@ -1804,7 +1804,7 @@ dependencies = [ [[package]] name = "error-support-macros" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "proc-macro2", "quote", @@ -1921,7 +1921,7 @@ dependencies = [ [[package]] name = "firefox-versioning" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "serde_json", "thiserror 1.999.999", @@ -3233,7 +3233,7 @@ dependencies = [ [[package]] name = "interrupt-support" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "lazy_static", "parking_lot", @@ -4944,7 +4944,7 @@ checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" [[package]] name = "payload-support" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "serde", "serde_derive", @@ -5447,7 +5447,7 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "relevancy" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "anyhow", "base64 0.21.999", @@ -5472,7 +5472,7 @@ dependencies = [ [[package]] name = "remote_settings" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "anyhow", "camino", @@ -5820,7 +5820,7 @@ dependencies = [ [[package]] name = "search" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "error-support", "firefox-versioning", @@ -6111,7 +6111,7 @@ dependencies = [ [[package]] name = "sql-support" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "interrupt-support", "lazy_static", @@ -6317,7 +6317,7 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "suggest" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "anyhow", "chrono", @@ -6369,7 +6369,7 @@ dependencies = [ [[package]] name = "sync-guid" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "base64 0.21.999", "rand", @@ -6380,7 +6380,7 @@ dependencies = [ [[package]] name = "sync15" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "anyhow", "error-support", @@ -6420,7 +6420,7 @@ dependencies = [ [[package]] name = "tabs" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "anyhow", "error-support", @@ -6764,7 +6764,7 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "types" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "rusqlite 0.33.0", "serde", @@ -7146,7 +7146,7 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "viaduct" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "ffi-support", "log", @@ -7316,7 +7316,7 @@ dependencies = [ [[package]] name = "webext-storage" version = "0.1.0" -source = "git+https://github.com/mozilla/application-services?rev=6a007c98292fa72965d36389ce32d7609e399217#6a007c98292fa72965d36389ce32d7609e399217" +source = "git+https://github.com/mozilla/application-services?rev=e1b42aa3292a71e788bc0f95fb5ab5fbe533996f#e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" dependencies = [ "anyhow", "error-support", diff --git a/Cargo.toml b/Cargo.toml index 72d438d6af1a..50c9db1fdff6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -259,14 +259,14 @@ malloc_size_of_derive = { path = "xpcom/rust/malloc_size_of_derive" } objc = { git = "https://github.com/glandium/rust-objc", rev = "4de89f5aa9851ceca4d40e7ac1e2759410c04324" } # application-services overrides to make updating them all simpler. -interrupt-support = { git = "https://github.com/mozilla/application-services", rev = "6a007c98292fa72965d36389ce32d7609e399217" } -relevancy = { git = "https://github.com/mozilla/application-services", rev = "6a007c98292fa72965d36389ce32d7609e399217" } -search = { git = "https://github.com/mozilla/application-services", rev = "6a007c98292fa72965d36389ce32d7609e399217" } -sql-support = { git = "https://github.com/mozilla/application-services", rev = "6a007c98292fa72965d36389ce32d7609e399217" } -suggest = { git = "https://github.com/mozilla/application-services", rev = "6a007c98292fa72965d36389ce32d7609e399217" } -sync15 = { git = "https://github.com/mozilla/application-services", rev = "6a007c98292fa72965d36389ce32d7609e399217" } -tabs = { git = "https://github.com/mozilla/application-services", rev = "6a007c98292fa72965d36389ce32d7609e399217" } -viaduct = { git = "https://github.com/mozilla/application-services", rev = "6a007c98292fa72965d36389ce32d7609e399217" } -webext-storage = { git = "https://github.com/mozilla/application-services", rev = "6a007c98292fa72965d36389ce32d7609e399217" } +interrupt-support = { git = "https://github.com/mozilla/application-services", rev = "e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" } +relevancy = { git = "https://github.com/mozilla/application-services", rev = "e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" } +search = { git = "https://github.com/mozilla/application-services", rev = "e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" } +sql-support = { git = "https://github.com/mozilla/application-services", rev = "e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" } +suggest = { git = "https://github.com/mozilla/application-services", rev = "e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" } +sync15 = { git = "https://github.com/mozilla/application-services", rev = "e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" } +tabs = { git = "https://github.com/mozilla/application-services", rev = "e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" } +viaduct = { git = "https://github.com/mozilla/application-services", rev = "e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" } +webext-storage = { git = "https://github.com/mozilla/application-services", rev = "e1b42aa3292a71e788bc0f95fb5ab5fbe533996f" } allocator-api2 = { path = "third_party/rust/allocator-api2" } diff --git a/browser/components/urlbar/tests/quicksuggest/browser/browser_quicksuggest_yelp.js b/browser/components/urlbar/tests/quicksuggest/browser/browser_quicksuggest_yelp.js index 0e12789e5bf2..7601c35acebe 100644 --- a/browser/components/urlbar/tests/quicksuggest/browser/browser_quicksuggest_yelp.js +++ b/browser/components/urlbar/tests/quicksuggest/browser/browser_quicksuggest_yelp.js @@ -12,7 +12,7 @@ const REMOTE_SETTINGS_RECORDS = [ subjects: ["ramen"], preModifiers: ["best"], postModifiers: ["delivery"], - locationSigns: ["in"], + locationSigns: [{ keyword: "in", needLocation: true }], yelpModifiers: [], icon: "1234", score: 0.5, diff --git a/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_yelp.js b/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_yelp.js index 12017629e06c..ba651fea868e 100644 --- a/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_yelp.js +++ b/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_yelp.js @@ -15,7 +15,10 @@ const REMOTE_SETTINGS_RECORDS = [ subjects: ["ramen", "ab", "alongerkeyword", "1234"], preModifiers: ["best"], postModifiers: ["delivery"], - locationSigns: ["in", "nearby"], + locationSigns: [ + { keyword: "in", needLocation: true }, + { keyword: "nearby", needLocation: false }, + ], yelpModifiers: [], icon: "1234", score: 0.5, @@ -86,8 +89,8 @@ add_task(async function basic() { description: "No specific location with location-modifier", query: "ramen nearby", expected: { - url: "https://www.yelp.com/search?find_desc=ramen&find_loc=Yokohama%2C+Kanagawa", - title: "ramen nearby Yokohama, Kanagawa", + url: "https://www.yelp.com/search?find_desc=ramen+nearby&find_loc=Yokohama%2C+Kanagawa", + title: "ramen nearby in Yokohama, Kanagawa", }, }, { diff --git a/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_yelp_ml.js b/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_yelp_ml.js index 5499c6f1c375..cbfec10a1642 100644 --- a/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_yelp_ml.js +++ b/browser/components/urlbar/tests/quicksuggest/unit/test_quicksuggest_yelp_ml.js @@ -19,7 +19,10 @@ const REMOTE_SETTINGS_RECORDS = [ subjects: ["coffee"], preModifiers: [], postModifiers: [], - locationSigns: ["in", "nearby"], + locationSigns: [ + { keyword: "in", needLocation: true }, + { keyword: "nearby", needLocation: false }, + ], yelpModifiers: [], icon: "1234", score: 0.5, diff --git a/third_party/rust/suggest/.cargo-checksum.json b/third_party/rust/suggest/.cargo-checksum.json index 7f80a636eff8..138fca2f603f 100644 --- a/third_party/rust/suggest/.cargo-checksum.json +++ b/third_party/rust/suggest/.cargo-checksum.json @@ -1 +1 @@ -{"files":{"Cargo.toml":"922b2e4d85f325dbef99d5e439558a75dbfda82e1d263c2dd3bfadac9879df18","README.md":"5e28baf874b643d756228bdab345e287bf107d3182dfe6a18aafadcc4b9a3fc9","benches/benchmark_all.rs":"5909dfb1e62793afb1f2bc15b75914527a4d14fce6796307c04a309e45c0598c","metrics.yaml":"0540ab2271aeab7f07335c7ceec12acde942995f9dcb3c29070489aa61899d56","src/benchmarks/README.md":"ccee8dbddba8762d0453fa855bd6984137b224b8c019f3dd8e86a3c303f51d71","src/benchmarks/client.rs":"e5897d4e2eda06809fa6dc6db4e780b9ef266f613fb113aa6613b83f7005dd0b","src/benchmarks/geoname.rs":"00fab05cf9465cf8e22e143cde75a81885411001b240af00efda4071975d0563","src/benchmarks/ingest.rs":"1f3b5eca704c51bc8f972e7a3492a518516461e5834f97a5f7d1855a048ab16b","src/benchmarks/mod.rs":"24751c377f549ead6b6e1d46685c649f51303cc090f6374c93633f71dcf3cadf","src/benchmarks/query.rs":"d54946063e72cf98e7f46d94665c17c66af637774c2bb50cd5798dbe63d74f3c","src/bin/debug_ingestion_sizes.rs":"ce6e810be7b3fc19e826d75b622b82cfab5a1a99397a6d0833c2c4eebff2d364","src/config.rs":"0ca876e845841bb6429862c0904c82265003f53b55aea053fac60aed278586a7","src/db.rs":"b4f1b46984ff5a6806546aa2acb2f4c5de3da2d067b3d42e0e7d13c2279ffcf1","src/error.rs":"e2ef3ec0e0b2b8ecbb8f2f1717d4cb753af06913b8395d086b7643098ad100a7","src/fakespot.rs":"f501c9fe5296e7c130a9fcb532b861465717652cb5ef688230bc7a3b94df91b1","src/geoname.rs":"77376dbc7d06532a7797a93b863f150317df7f31d9200d375c8ea489ac8bee6f","src/lib.rs":"a4c0989a01a7c13184049c1f11bc7813cd3cbfb6354fcca1f5a7204e45a0dc9c","src/metrics.rs":"871f0d834efbbc9e26d61f66fa31f0021dcf41444746cd7c082f93ba9628e399","src/pocket.rs":"1316668840ec9b4ea886223921dc9d3b5a1731d1a5206c0b1089f2a6c45c1b7b","src/provider.rs":"cf00114a4293a4c9d956efffb8a6859f3568ea0e4868c6b63b8273daca69b0d5","src/query.rs":"66f229272c9245eb8ee0cab237071627aec599f145f64da8894bcaeb1ed7c6f9","src/rs.rs":"f539abfa9997a0711c6a2bd9ae616698eaa5b89983b667d2b9881cfb9635b7b2","src/schema.rs":"206c3cf7198783b8fa8a7b3039a538f8408a0a7eeb1331adf1b8022e14f46a2b","src/store.rs":"a2bd55aa9b686a80d59eacef9ddf43bbdc9fffb995af4a85c24fbe48bfd17ba6","src/suggestion.rs":"e74abdc1eace082ad7ed8762bcee25b1943ec3d04d7e644959c5737b42732660","src/testing/client.rs":"47a32fd84c733001f11e8bfff94dc8c060b6b0780346dca5ddc7a5f5489c1d85","src/testing/data.rs":"6b3dad0414dd862d939f31672547e33a852056e8f891cfec9c1a9cc9fb91d54d","src/testing/mod.rs":"34120abb160a913069c3f7df03c4f52815be3461dbbf08fb0fcc4251a517ba71","src/util.rs":"52c6ec405637afa2d1a89f29fbbb7dcc341546b6deb97d326c4490bbf8713cb0","src/weather.rs":"7cc9167dcdfca49d6ad91eba6fba4d5fd49f45052f25a7fe3ad6749d3e6783fb","src/yelp.rs":"4e7cf36318c061bf73e20e52b05d8b1c6a0a904129594d92dddeb071ea52db93","uniffi.toml":"8205e4679ac26d53e70af0f85c013fd27cda1119f4322aebf5f2b9403d45a611"},"package":null} \ No newline at end of file +{"files":{"Cargo.toml":"922b2e4d85f325dbef99d5e439558a75dbfda82e1d263c2dd3bfadac9879df18","README.md":"5e28baf874b643d756228bdab345e287bf107d3182dfe6a18aafadcc4b9a3fc9","benches/benchmark_all.rs":"5909dfb1e62793afb1f2bc15b75914527a4d14fce6796307c04a309e45c0598c","metrics.yaml":"0540ab2271aeab7f07335c7ceec12acde942995f9dcb3c29070489aa61899d56","src/benchmarks/README.md":"ccee8dbddba8762d0453fa855bd6984137b224b8c019f3dd8e86a3c303f51d71","src/benchmarks/client.rs":"e5897d4e2eda06809fa6dc6db4e780b9ef266f613fb113aa6613b83f7005dd0b","src/benchmarks/geoname.rs":"00fab05cf9465cf8e22e143cde75a81885411001b240af00efda4071975d0563","src/benchmarks/ingest.rs":"1f3b5eca704c51bc8f972e7a3492a518516461e5834f97a5f7d1855a048ab16b","src/benchmarks/mod.rs":"24751c377f549ead6b6e1d46685c649f51303cc090f6374c93633f71dcf3cadf","src/benchmarks/query.rs":"d54946063e72cf98e7f46d94665c17c66af637774c2bb50cd5798dbe63d74f3c","src/bin/debug_ingestion_sizes.rs":"ce6e810be7b3fc19e826d75b622b82cfab5a1a99397a6d0833c2c4eebff2d364","src/config.rs":"0ca876e845841bb6429862c0904c82265003f53b55aea053fac60aed278586a7","src/db.rs":"566e62ab951c0a372450ffb8842ded85a0147242cf191254d895dc0fe320a58c","src/error.rs":"e2ef3ec0e0b2b8ecbb8f2f1717d4cb753af06913b8395d086b7643098ad100a7","src/fakespot.rs":"f501c9fe5296e7c130a9fcb532b861465717652cb5ef688230bc7a3b94df91b1","src/geoname.rs":"77376dbc7d06532a7797a93b863f150317df7f31d9200d375c8ea489ac8bee6f","src/lib.rs":"a4c0989a01a7c13184049c1f11bc7813cd3cbfb6354fcca1f5a7204e45a0dc9c","src/metrics.rs":"871f0d834efbbc9e26d61f66fa31f0021dcf41444746cd7c082f93ba9628e399","src/pocket.rs":"1316668840ec9b4ea886223921dc9d3b5a1731d1a5206c0b1089f2a6c45c1b7b","src/provider.rs":"cf00114a4293a4c9d956efffb8a6859f3568ea0e4868c6b63b8273daca69b0d5","src/query.rs":"66f229272c9245eb8ee0cab237071627aec599f145f64da8894bcaeb1ed7c6f9","src/rs.rs":"37cce2cb0068421f6b40e13f3bcb1f6212acee2f7117759cd095d381b25580f8","src/schema.rs":"51dfe27c01884dfbd3bb7c868c01505dd69cf119d9bb37ddb653f77ead170956","src/store.rs":"d127c58e26a3e380e815e11e6660feb58df335ab40426aa051902a6fec659b5a","src/suggestion.rs":"e74abdc1eace082ad7ed8762bcee25b1943ec3d04d7e644959c5737b42732660","src/testing/client.rs":"47a32fd84c733001f11e8bfff94dc8c060b6b0780346dca5ddc7a5f5489c1d85","src/testing/data.rs":"5b1935946185f55be2383f2f979e966155825b1b9df7913d93eb50289052639c","src/testing/mod.rs":"34120abb160a913069c3f7df03c4f52815be3461dbbf08fb0fcc4251a517ba71","src/util.rs":"52c6ec405637afa2d1a89f29fbbb7dcc341546b6deb97d326c4490bbf8713cb0","src/weather.rs":"7cc9167dcdfca49d6ad91eba6fba4d5fd49f45052f25a7fe3ad6749d3e6783fb","src/yelp.rs":"0b9dfa698d9c3162d47c0103d1799838d444345f9d7f943eedc6bcc98fd8b57d","uniffi.toml":"8205e4679ac26d53e70af0f85c013fd27cda1119f4322aebf5f2b9403d45a611"},"package":null} \ No newline at end of file diff --git a/third_party/rust/suggest/src/db.rs b/third_party/rust/suggest/src/db.rs index abc3602d0482..427473567d96 100644 --- a/third_party/rust/suggest/src/db.rs +++ b/third_party/rust/suggest/src/db.rs @@ -1340,6 +1340,11 @@ impl<'a> SuggestDao<'a> { named_params! { ":record_id": record_id.as_str() }, )?; self.scope.err_if_interrupted()?; + self.conn.execute_cached( + "DELETE FROM yelp_location_signs WHERE record_id = :record_id", + named_params! { ":record_id": record_id.as_str() }, + )?; + self.scope.err_if_interrupted()?; self.conn.execute_cached( "DELETE FROM yelp_custom_details WHERE record_id = :record_id", named_params! { ":record_id": record_id.as_str() }, diff --git a/third_party/rust/suggest/src/rs.rs b/third_party/rust/suggest/src/rs.rs index e833ba68340f..c5eacfdabc14 100644 --- a/third_party/rust/suggest/src/rs.rs +++ b/third_party/rust/suggest/src/rs.rs @@ -42,8 +42,6 @@ use serde_json::{Map, Value}; use crate::{error::Error, query::full_keywords_to_fts_content, Result}; -use rusqlite::{types::ToSqlOutput, ToSql}; - #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum Collection { Amp, @@ -455,21 +453,12 @@ pub(crate) struct DownloadedPocketSuggestion { pub high_confidence_keywords: Vec, pub score: f64, } -/// Yelp location sign data type +/// A location sign for Yelp to ingest from a Yelp Attachment #[derive(Clone, Debug, Deserialize)] -#[serde(untagged)] -pub enum DownloadedYelpLocationSign { - V1 { keyword: String }, - V2(String), -} -impl ToSql for DownloadedYelpLocationSign { - fn to_sql(&self) -> rusqlite::Result> { - let keyword = match self { - DownloadedYelpLocationSign::V1 { keyword } => keyword, - DownloadedYelpLocationSign::V2(keyword) => keyword, - }; - Ok(ToSqlOutput::from(keyword.as_str())) - } +pub(crate) struct DownloadedYelpLocationSign { + pub keyword: String, + #[serde(rename = "needLocation")] + pub need_location: bool, } /// A Yelp suggestion to ingest from a Yelp Attachment #[derive(Clone, Debug, Deserialize)] diff --git a/third_party/rust/suggest/src/schema.rs b/third_party/rust/suggest/src/schema.rs index 5bf8057389ba..db00c8581695 100644 --- a/third_party/rust/suggest/src/schema.rs +++ b/third_party/rust/suggest/src/schema.rs @@ -23,7 +23,7 @@ use sql_support::{ /// `clear_database()` by adding their names to `conditional_tables`, unless /// they are cleared via a deletion trigger or there's some other good /// reason not to do so. -pub const VERSION: u32 = 36; +pub const VERSION: u32 = 35; /// The current Suggest database schema. pub const SQL: &str = " @@ -171,6 +171,12 @@ CREATE TABLE yelp_modifiers( PRIMARY KEY (type, keyword) ) WITHOUT ROWID; +CREATE TABLE yelp_location_signs( + keyword TEXT PRIMARY KEY, + need_location INTEGER NOT NULL, + record_id TEXT NOT NULL +) WITHOUT ROWID; + CREATE TABLE yelp_custom_details( icon_id TEXT PRIMARY KEY, score REAL NOT NULL, @@ -639,10 +645,6 @@ impl ConnectionInitializer for SuggestConnectionInitializer<'_> { )?; Ok(()) } - 35 => { - tx.execute_batch("DROP TABLE yelp_location_signs;")?; - Ok(()) - } _ => Err(open_database::Error::IncompatibleVersion(version)), } } @@ -660,6 +662,7 @@ pub fn clear_database(db: &Connection) -> rusqlite::Result<()> { DELETE FROM icons; DELETE FROM yelp_subjects; DELETE FROM yelp_modifiers; + DELETE FROM yelp_location_signs; DELETE FROM yelp_custom_details; ", )?; diff --git a/third_party/rust/suggest/src/store.rs b/third_party/rust/suggest/src/store.rs index b9d60a209063..951e882988e9 100644 --- a/third_party/rust/suggest/src/store.rs +++ b/third_party/rust/suggest/src/store.rs @@ -1850,21 +1850,9 @@ pub(crate) mod tests { "https://www.yelp.com/search?find_desc=ramen+super+delivery&find_loc=tokyo" ),], ); - assert_eq!( - store.fetch_suggestions(SuggestionQuery::yelp("ramen invalid_delivery")), - vec![ramen_suggestion( - "ramen invalid_delivery", - "https://www.yelp.com/search?find_desc=ramen&find_loc=invalid_delivery" - ) - .has_location_sign(false),], - ); assert_eq!( store.fetch_suggestions(SuggestionQuery::yelp("ramen invalid_delivery in tokyo")), - vec![ramen_suggestion( - "ramen invalid_delivery in tokyo", - "https://www.yelp.com/search?find_desc=ramen&find_loc=invalid_delivery+in+tokyo" - ) - .has_location_sign(false),], + vec![], ); assert_eq!( store.fetch_suggestions(SuggestionQuery::yelp("ramen in tokyo")), @@ -1882,11 +1870,7 @@ pub(crate) mod tests { ); assert_eq!( store.fetch_suggestions(SuggestionQuery::yelp("ramen invalid_in tokyo")), - vec![ramen_suggestion( - "ramen invalid_in tokyo", - "https://www.yelp.com/search?find_desc=ramen&find_loc=invalid_in+tokyo" - ) - .has_location_sign(false),], + vec![], ); assert_eq!( store.fetch_suggestions(SuggestionQuery::yelp("ramen in San Francisco")), @@ -1906,22 +1890,21 @@ pub(crate) mod tests { store.fetch_suggestions(SuggestionQuery::yelp("ramen near by")), vec![ramen_suggestion( "ramen near by", - "https://www.yelp.com/search?find_desc=ramen" - )], + "https://www.yelp.com/search?find_desc=ramen+near+by" + ) + .has_location_sign(false),], ); assert_eq!( store.fetch_suggestions(SuggestionQuery::yelp("ramen near me")), vec![ramen_suggestion( "ramen near me", - "https://www.yelp.com/search?find_desc=ramen" - )], + "https://www.yelp.com/search?find_desc=ramen+near+me" + ) + .has_location_sign(false),], ); assert_eq!( store.fetch_suggestions(SuggestionQuery::yelp("ramen near by tokyo")), - vec![ramen_suggestion( - "ramen near by tokyo", - "https://www.yelp.com/search?find_desc=ramen&find_loc=tokyo" - )], + vec![], ); assert_eq!( store.fetch_suggestions(SuggestionQuery::yelp("ramen")), @@ -2068,38 +2051,6 @@ pub(crate) mod tests { .has_location_sign(false) .subject_exact_match(false)], ); - // Test for prefix match. - assert_eq!( - store.fetch_suggestions(SuggestionQuery::yelp("ramen D")), - vec![ramen_suggestion( - "ramen Delivery", - "https://www.yelp.com/search?find_desc=ramen+Delivery" - ) - .has_location_sign(false)], - ); - assert_eq!( - store.fetch_suggestions(SuggestionQuery::yelp("ramen I")), - vec![ramen_suggestion( - "ramen In", - "https://www.yelp.com/search?find_desc=ramen" - )], - ); - assert_eq!( - store.fetch_suggestions(SuggestionQuery::yelp("ramen Y")), - vec![ - ramen_suggestion("ramen", "https://www.yelp.com/search?find_desc=ramen") - .has_location_sign(false) - ], - ); - // Prefix match is available only for last words. - assert_eq!( - store.fetch_suggestions(SuggestionQuery::yelp("ramen I Tokyo")), - vec![ramen_suggestion( - "ramen I Tokyo", - "https://www.yelp.com/search?find_desc=ramen&find_loc=I+Tokyo" - ) - .has_location_sign(false)], - ); Ok(()) } diff --git a/third_party/rust/suggest/src/testing/data.rs b/third_party/rust/suggest/src/testing/data.rs index f1d699cc99f0..d685f3c7a926 100644 --- a/third_party/rust/suggest/src/testing/data.rs +++ b/third_party/rust/suggest/src/testing/data.rs @@ -297,12 +297,10 @@ pub fn ramen_yelp() -> JsonValue { "preModifiers": ["best", "super best", "same_modifier"], "postModifiers": ["delivery", "super delivery", "same_modifier"], "locationSigns": [ - // V1 format also can be used as location sign. { "keyword": "in", "needLocation": true }, + { "keyword": "near", "needLocation": true }, { "keyword": "near by", "needLocation": false }, - // V2 format. - "near", - "near me", + { "keyword": "near me", "needLocation": false }, ], "yelpModifiers": ["yelp", "yelp keyword"], "icon": "yelp-favicon", diff --git a/third_party/rust/suggest/src/yelp.rs b/third_party/rust/suggest/src/yelp.rs index 81ec6d5dcf67..442985ed1310 100644 --- a/third_party/rust/suggest/src/yelp.rs +++ b/third_party/rust/suggest/src/yelp.rs @@ -22,7 +22,6 @@ enum Modifier { Pre = 0, Post = 1, Yelp = 2, - LocationSign = 3, } impl ToSql for Modifier { @@ -31,12 +30,6 @@ impl ToSql for Modifier { } } -#[derive(Eq, PartialEq)] -enum FindFrom { - First, - Last, -} - /// This module assumes like following query. /// "Yelp-modifier? Pre-modifier? Subject Post-modifier? (Location-modifier | Location-sign Location?)? Yelp-modifier?" /// For example, the query below is valid. @@ -111,14 +104,14 @@ impl SuggestDao<'_> { )?; } - for keyword in &suggestion.location_signs { + for sign in &suggestion.location_signs { self.scope.err_if_interrupted()?; self.conn.execute_cached( - "INSERT INTO yelp_modifiers(record_id, type, keyword) VALUES(:record_id, :type, :keyword)", + "INSERT INTO yelp_location_signs(record_id, keyword, need_location) VALUES(:record_id, :keyword, :need_location)", named_params! { ":record_id": record_id.as_str(), - ":type": Modifier::LocationSign, - ":keyword": keyword, + ":keyword": sign.keyword, + ":need_location": sign.need_location, }, )?; } @@ -149,57 +142,62 @@ impl SuggestDao<'_> { return Ok(vec![]); } - let query_vec: Vec<_> = query.keyword.split_whitespace().collect(); - let mut query_words: &[&str] = &query_vec; - - let pre_yelp_modifier_tuple = - self.find_modifier(query_words, Modifier::Yelp, FindFrom::First)?; - if let Some((_, n)) = pre_yelp_modifier_tuple { - query_words = &query_words[n..]; + let query_string = &query.keyword.trim(); + if !query_string.contains(' ') { + let Some((subject, subject_exact_match)) = self.find_subject(query_string)? else { + return Ok(vec![]); + }; + let (icon, icon_mimetype, score) = self.fetch_custom_details()?; + let builder = SuggestionBuilder { + subject: &subject, + subject_exact_match, + pre_modifier: None, + post_modifier: None, + location_sign: None, + location: None, + need_location: false, + icon, + icon_mimetype, + score, + }; + return Ok(vec![builder.into()]); } - let pre_modifier_tuple = self.find_modifier(query_words, Modifier::Pre, FindFrom::First)?; - if let Some((_, n)) = pre_modifier_tuple { - query_words = &query_words[n..]; - } + // Find the yelp keyword modifier and remove them from the query. + let (query_without_yelp_modifiers, _, _) = + self.find_modifiers(query_string, Modifier::Yelp, Modifier::Yelp)?; - let Some(subject_tuple) = self.find_subject(query_words)? else { + // Find the location sign and the location. + let (query_without_location, location_sign, location, need_location) = + self.find_location(&query_without_yelp_modifiers)?; + + if let (Some(_), false) = (&location, need_location) { + // The location sign does not need the specific location, but user is setting something. return Ok(vec![]); - }; - query_words = &query_words[subject_tuple.2..]; - - let post_modifier_tuple = - self.find_modifier(query_words, Modifier::Post, FindFrom::First)?; - if let Some((_, n)) = post_modifier_tuple { - query_words = &query_words[n..]; } - let location_sign_tuple = - self.find_modifier(query_words, Modifier::LocationSign, FindFrom::First)?; - if let Some((_, n)) = location_sign_tuple { - query_words = &query_words[n..]; + if query_without_location.is_empty() { + // No remained query. + return Ok(vec![]); } - let post_yelp_modifier_tuple = - self.find_modifier(query_words, Modifier::Yelp, FindFrom::Last)?; - if let Some((_, n)) = post_yelp_modifier_tuple { - query_words = &query_words[0..query_words.len() - n]; - } + // Find the modifiers. + let (subject_candidate, pre_modifier, post_modifier) = + self.find_modifiers(&query_without_location, Modifier::Pre, Modifier::Post)?; - let location = if query_words.is_empty() { - None - } else { - Some(query_words.join(" ")) + let Some((subject, subject_exact_match)) = self.find_subject(&subject_candidate)? else { + return Ok(vec![]); }; let (icon, icon_mimetype, score) = self.fetch_custom_details()?; let builder = SuggestionBuilder { - subject: &subject_tuple.0, - subject_exact_match: subject_tuple.1, - pre_modifier: pre_modifier_tuple.map(|(words, _)| words.to_string()), - post_modifier: post_modifier_tuple.map(|(words, _)| words.to_string()), - location_sign: location_sign_tuple.map(|(words, _)| words.to_string()), + subject: &subject, + subject_exact_match, + pre_modifier, + post_modifier, + location_sign, location, + need_location, icon, icon_mimetype, score, @@ -207,122 +205,6 @@ impl SuggestDao<'_> { Ok(vec![builder.into()]) } - /// Find the modifier for given query and modifier type. - /// Find from last word, if set FindFrom::Last to find_from. - /// It returns Option as follows: - /// ( - /// String: The keyword in DB (but the case is inherited by query). - /// usize: Number of words in query_words that match the keyword. - /// Maximum number is MAX_MODIFIER_WORDS_NUMBER. - /// ) - fn find_modifier( - &self, - query_words: &[&str], - modifier_type: Modifier, - find_from: FindFrom, - ) -> Result> { - if query_words.is_empty() { - return Ok(None); - } - - for n in (1..=std::cmp::min(MAX_MODIFIER_WORDS_NUMBER, query_words.len())).rev() { - let candidate_chunk = match find_from { - FindFrom::First => query_words.chunks(n).next(), - FindFrom::Last => query_words.rchunks(n).next(), - }; - let candidate = candidate_chunk - .map(|chunk| chunk.join(" ")) - .unwrap_or_default(); - if let Some(keyword_lowercase) = self.conn.try_query_one::( - if n == query_words.len() { - " - SELECT keyword FROM yelp_modifiers - WHERE type = :type AND keyword BETWEEN :word AND :word || x'FFFF' - LIMIT 1 - " - } else { - " - SELECT keyword FROM yelp_modifiers - WHERE type = :type AND keyword = :word - LIMIT 1 - " - }, - named_params! { - ":type": modifier_type, - ":word": candidate.to_lowercase(), - }, - true, - )? { - // Preserve the query as the user typed it including its case. - let keyword = format!("{}{}", candidate, &keyword_lowercase[candidate.len()..]); - return Ok(Some((keyword, n))); - } - } - - Ok(None) - } - - /// Find the subject for given query. - /// It returns Option as follows: - /// ( - /// String: The keyword in DB (but the case is inherited by query). - /// bool: Whether or not the keyword is exact match. - /// usize: Number of words in query_words that match the keyword. - /// ) - fn find_subject(&self, query_words: &[&str]) -> Result> { - if query_words.is_empty() { - return Ok(None); - } - - let query_string = query_words.join(" "); - - // This checks if keyword is a substring of the query. - if let Some(keyword_lowercase) = self.conn.try_query_one::( - "SELECT keyword - FROM yelp_subjects - WHERE :query BETWEEN keyword AND keyword || x'FFFF' - ORDER BY LENGTH(keyword) ASC, keyword ASC - LIMIT 1", - named_params! { - ":query": query_string.to_lowercase(), - }, - true, - )? { - // Preserve the query as the user typed it including its case. - let keyword = &query_string[0..keyword_lowercase.len()]; - let count = keyword.split_whitespace().count(); - return Ok(Some((keyword.to_string(), true, count))); - }; - - if query_string.len() < SUBJECT_PREFIX_MATCH_THRESHOLD { - return Ok(None); - } - - // Oppositely, this checks if the query is a substring of keyword. - if let Some(keyword_lowercase) = self.conn.try_query_one::( - "SELECT keyword - FROM yelp_subjects - WHERE keyword BETWEEN :query AND :query || x'FFFF' - ORDER BY LENGTH(keyword) ASC, keyword ASC - LIMIT 1", - named_params! { - ":query": query_string.to_lowercase(), - }, - true, - )? { - // Preserve the query as the user typed it including its case. - let keyword = format!( - "{}{}", - query_string, - &keyword_lowercase[query_string.len()..] - ); - let count = keyword.split_whitespace().count(); - return Ok(Some((keyword, false, count))); - }; - - Ok(None) - } - /// Fetch the custom details for Yelp suggestions. /// It returns the location tuple as follows: /// ( @@ -362,6 +244,202 @@ impl SuggestDao<'_> { Ok(result) } + + /// Find the location information from the given query string. + /// It returns the location tuple as follows: + /// ( + /// String: Query string that is removed found location information. + /// Option: Location sign found in yelp_location_signs table. If not found, returns None. + /// Option: Specific location name after location sign. If not found, returns None. + /// bool: Reflects need_location field in the table. + /// ) + fn find_location(&self, query: &str) -> Result<(String, Option, Option, bool)> { + let query_with_spaces = format!(" {} ", query); + let mut results: Vec<(usize, usize, i8)> = self.conn.query_rows_and_then_cached( + " + SELECT + INSTR(:query, ' ' || keyword || ' ') AS sign_index, + LENGTH(keyword) AS sign_length, + need_location + FROM yelp_location_signs + WHERE + sign_index > 0 + ORDER BY + sign_length DESC + LIMIT 1 + ", + named_params! { + ":query": &query_with_spaces.to_lowercase(), + }, + |row| -> Result<_> { + Ok(( + row.get::<_, usize>("sign_index")?, + row.get::<_, usize>("sign_length")?, + row.get::<_, i8>("need_location")?, + )) + }, + )?; + + let (sign_index, sign_length, need_location) = if let Some(res) = results.pop() { + res + } else { + return Ok((query.trim().to_string(), None, None, false)); + }; + + let pre_location = query_with_spaces + .get(..sign_index) + .map(str::trim) + .map(str::to_string) + .unwrap_or_default(); + let location_sign = query_with_spaces + .get(sign_index..sign_index + sign_length) + .map(str::trim) + .filter(|s| !s.is_empty()) + .map(str::to_string); + let location = query_with_spaces + .get(sign_index + sign_length..) + .map(str::trim) + .filter(|s| !s.is_empty()) + .map(str::to_string); + + Ok((pre_location, location_sign, location, need_location == 1)) + } + + /// Find the pre/post modifier from the given query string. + /// It returns the modifiers tuple as follows: + /// ( + /// String: Query string that is removed found the modifiers. + /// Option: Pre-modifier found in the yelp_modifiers table. If not found, returns None. + /// Option: Post-modifier found in the yelp_modifiers table. If not found, returns None. + /// ) + fn find_modifiers( + &self, + query: &str, + pre_modifier_type: Modifier, + post_modifier_type: Modifier, + ) -> Result<(String, Option, Option)> { + if !query.contains(' ') { + return Ok((query.to_string(), None, None)); + } + + let words: Vec<_> = query.split_whitespace().collect(); + + let mut pre_modifier = None; + for n in (1..=MAX_MODIFIER_WORDS_NUMBER).rev() { + let mut candidate_chunks = words.chunks(n); + let candidate = candidate_chunks.next().unwrap_or(&[""]).join(" "); + if self.is_modifier(&candidate, pre_modifier_type)? { + pre_modifier = Some(candidate); + break; + } + } + + let mut post_modifier = None; + for n in (1..=MAX_MODIFIER_WORDS_NUMBER).rev() { + let mut candidate_chunks = words.rchunks(n); + let candidate = candidate_chunks.next().unwrap_or(&[""]).join(" "); + if self.is_modifier(&candidate, post_modifier_type)? { + post_modifier = Some(candidate); + break; + } + } + + let mut without_modifiers = query; + if let Some(ref modifier) = pre_modifier { + without_modifiers = &without_modifiers[modifier.len()..]; + } + if let Some(ref modifier) = post_modifier { + without_modifiers = &without_modifiers[..without_modifiers.len() - modifier.len()]; + } + + Ok(( + without_modifiers.trim().to_string(), + pre_modifier, + post_modifier, + )) + } + + /// Find the subject from the given string. + /// It returns the Option. If it is not none, it contains the tuple as follows: + /// ( + /// String: Subject. + /// bool: Whether the subject matched exactly with the parameter. + /// ) + fn find_subject(&self, candidate: &str) -> Result> { + if candidate.is_empty() { + return Ok(None); + } + + // If the length of subject candidate is less than + // SUBJECT_PREFIX_MATCH_THRESHOLD, should exact match. + if candidate.len() < SUBJECT_PREFIX_MATCH_THRESHOLD { + return Ok(if self.is_subject(candidate)? { + Some((candidate.to_string(), true)) + } else { + None + }); + } + + // Otherwise, apply prefix-match. + Ok( + match self.conn.query_row_and_then_cachable( + "SELECT keyword + FROM yelp_subjects + WHERE keyword BETWEEN :candidate AND :candidate || x'FFFF' + ORDER BY LENGTH(keyword) ASC, keyword ASC + LIMIT 1", + named_params! { + ":candidate": candidate.to_lowercase(), + }, + |row| row.get::<_, String>(0), + true, + ) { + Ok(keyword) => { + debug_assert!(candidate.len() <= keyword.len()); + Some(( + format!("{}{}", candidate, &keyword[candidate.len()..]), + candidate.len() == keyword.len(), + )) + } + Err(_) => None, + }, + ) + } + + fn is_modifier(&self, word: &str, modifier_type: Modifier) -> Result { + let result = self.conn.query_row_and_then_cachable( + " + SELECT EXISTS ( + SELECT 1 FROM yelp_modifiers WHERE type = :type AND keyword = :word LIMIT 1 + ) + ", + named_params! { + ":type": modifier_type, + ":word": word.to_lowercase(), + }, + |row| row.get::<_, bool>(0), + true, + )?; + + Ok(result) + } + + fn is_subject(&self, word: &str) -> Result { + let result = self.conn.query_row_and_then_cachable( + " + SELECT EXISTS ( + SELECT 1 FROM yelp_subjects WHERE keyword = :word LIMIT 1 + ) + ", + named_params! { + ":word": word.to_lowercase(), + }, + |row| row.get::<_, bool>(0), + true, + )?; + + Ok(result) + } } struct SuggestionBuilder<'a> { @@ -371,6 +449,7 @@ struct SuggestionBuilder<'a> { post_modifier: Option, location_sign: Option, location: Option, + need_location: bool, icon: Option>, icon_mimetype: Option, score: f64, @@ -378,10 +457,17 @@ struct SuggestionBuilder<'a> { impl<'a> From> for Suggestion { fn from(builder: SuggestionBuilder<'a>) -> Suggestion { + // This location sign such the 'near by' needs to add as a description parameter. + let location_modifier = if !builder.need_location { + builder.location_sign.as_deref() + } else { + None + }; let description = [ builder.pre_modifier.as_deref(), Some(builder.subject), builder.post_modifier.as_deref(), + location_modifier, ] .iter() .flatten() @@ -393,7 +479,7 @@ impl<'a> From> for Suggestion { let mut url = String::from("https://www.yelp.com/search?"); let mut parameters = form_urlencoded::Serializer::new(String::new()); parameters.append_pair("find_desc", &description); - if let Some(location) = &builder.location { + if let (Some(location), true) = (&builder.location, builder.need_location) { parameters.append_pair("find_loc", location); } url.push_str(¶meters.finish()); @@ -417,7 +503,7 @@ impl<'a> From> for Suggestion { icon: builder.icon, icon_mimetype: builder.icon_mimetype, score: builder.score, - has_location_sign: builder.location_sign.is_some(), + has_location_sign: location_modifier.is_none() && builder.location_sign.is_some(), subject_exact_match: builder.subject_exact_match, location_param: "find_loc".to_string(), } diff --git a/toolkit/components/ml/tests/browser/data/suggest/yelp_val_keywords_data.json b/toolkit/components/ml/tests/browser/data/suggest/yelp_val_keywords_data.json index 5062a7340bef..07ef93323183 100644 --- a/toolkit/components/ml/tests/browser/data/suggest/yelp_val_keywords_data.json +++ b/toolkit/components/ml/tests/browser/data/suggest/yelp_val_keywords_data.json @@ -2890,7 +2890,14 @@ "list of" ], "postModifiers": ["delivery"], - "locationSigns": ["near me", "in", "nearby", "near", "near by", "in area"], + "locationSigns": [ + { "keyword": "near me", "needLocation": false }, + { "keyword": "in", "needLocation": true }, + { "keyword": "nearby", "needLocation": false }, + { "keyword": "near", "needLocation": true }, + { "keyword": "near by", "needLocation": false }, + { "keyword": "in area", "needLocation": false } + ], "yelpModifiers": [ "yekp", "yel",