Re: Suggester autocomplete for address information

2019-02-26 Thread Kehan Harman
I'd like to clarify that what I am looking for is the right field type for
the address field that will suggest values as follows for the input:
Input:
"123 SM"
Suggestions:

   - 123-127 SMITH STREET, KEMPSEY NSW 2440
   - 123 SMYTHE STREET. RANDOM PLACE 


And in addition to this I want the search to also provide results if I
simply include the postcode (4 integers here in Oz) as follows:

Input:
"2440"

Suggestions:

   - 123-127 SMITH STREET, KEMPSEY NSW 2440
   - 120 SMITH STREET, KEMPSEY NSW 2440
   - 65 SMITH STREET, KEMPSEY NSW 2440
   - 2440 ANOTHER RANDOM ROAD, RANDOM PLACE 


In short I would like it to try to match the beginning part of the address
first and if that fails start using later parts of the string such as
suburb, state and postcode.

The field type that I'm currently using as the basis of these suggestions
is as follows:



  <
filter class="solr.StopFilterFactory" words="lang/stopwords_en.txt"
ignoreCase="true"/> 

Thanks,
Kehan


On Tue, 26 Feb 2019 at 21:54, Kehan Harman <
kehan.har...@gaiaresources.com.au> wrote:

> Hi All,
>
> I'm new to Solr & the community so feel free to ignore / remove if this is
> the incorrect mailing list for this query.
>
> I'm trying to build an autocomplete using a Solr index for addresses in a
> format similar to:
>
> 123 Smith Street, KEMPSEY, NSW 2440
>
> I'm looking to have these addresses suggest values to users based on their
> input with some spellchecking capability.
>
> My documents contain contents like:
> { "id":"ANSW718363409", "table":"ADDRESS_DEFAULT_GEOCODE", "address":"123-127
> SMITH STREET, KEMPSEY NSW 2440", "address_location":
> "-31.07321967,152.84505473", "address_latitude":-31.07322, "
> address_longitude":152.84506, "locality_pid":"NSW2119", "locality_latitude
> ":-31.060476, "locality_longitude":152.84819, "suburb_postcode":"KEMPSEY
> NSW 2440", "number_first":123, "number_last":127, "street_number":
> "123-127", "street_name":"SMITH", "street_type_code":"STREET", "
> locality_name":"KEMPSEY", "state_name":"NEW SOUTH WALES", "
> state_abbreviation":"NSW", "postcode":"2440", "_version_":
> 1626515771141128204}
>
> These are Australian addresses extracted from
> https://data.gov.au/dataset/ds-dga-19432f89-dc3a-4ef3-b943-5326ef1dbecc/details
> .
>
> My managed schema has the following fields - I'm using the example managed
> schema *sample_techproducts_configs* with some additional fields that
> have been added using the schema API.:
>
>  stored="true"/>  "false" indexed="true" stored="true"/>  ="location" multiValued="false" indexed="true" stored="true"/>  ="address_longitude" type="float" multiValued="false" indexed="true"
> stored="true"/>  "false" indexed="true" stored="true"/>  "string" multiValued="false" indexed="true" stored="true"/>  "flat_number" type="int" multiValued="false" indexed="true" stored="true"
> />  "true" stored="true"/>  stored="true"/>  ="true" required="true" stored="true"/>  "strings"/>  indexed="true" stored="true"/>  "float" multiValued="false" indexed="true" stored="true"/>  "locality_location" type="location" multiValued="false" indexed="true"
> stored="true"/>  "false" indexed="true" stored="true"/>  "string" multiValued="false" indexed="true" stored="true"/>  "locality_pid" type="string" multiValued="false" indexed="true" stored=
> "true"/>  ="true" stored="true"/>  multiValued="false" indexed="true" stored="true"/>  "number_last" type="int" multiValued="false" indexed="true" stored="true"
> />  indexed="true" stored="true"/>  multiValued="false" indexed="true" stored="true"/>  "state_abbreviation" type="string" multiValued="false" indexed="true"
> stored=&quo

Suggester autocomplete for address information

2019-02-26 Thread Kehan Harman
Hi All,

I'm new to Solr & the community so feel free to ignore / remove if this is
the incorrect mailing list for this query.

I'm trying to build an autocomplete using a Solr index for addresses in a
format similar to:

123 Smith Street, KEMPSEY, NSW 2440

I'm looking to have these addresses suggest values to users based on their
input with some spellchecking capability.

My documents contain contents like:
{ "id":"ANSW718363409", "table":"ADDRESS_DEFAULT_GEOCODE", "address":"123-127
SMITH STREET, KEMPSEY NSW 2440", "address_location":
"-31.07321967,152.84505473", "address_latitude":-31.07322, "
address_longitude":152.84506, "locality_pid":"NSW2119", "locality_latitude":
-31.060476, "locality_longitude":152.84819, "suburb_postcode":"KEMPSEY NSW
2440", "number_first":123, "number_last":127, "street_number":"123-127", "
street_name":"SMITH", "street_type_code":"STREET", "locality_name":"KEMPSEY",
"state_name":"NEW SOUTH WALES", "state_abbreviation":"NSW", "postcode":
"2440", "_version_":1626515771141128204}

These are Australian addresses extracted from
https://data.gov.au/dataset/ds-dga-19432f89-dc3a-4ef3-b943-5326ef1dbecc/details
.

My managed schema has the following fields - I'm using the example managed
schema *sample_techproducts_configs* with some additional fields that have
been added using the schema API.:

 <
field name="id" type="string" multiValued="false" indexed="true" required=
"true" stored="true"/>  
 
   
   

The search component / requestHandler are defined as follows.

  suburb 
FuzzyLookupFactory 
DocumentDictionaryFactory suburb_postcode string true
   address FuzzyLookupFactory 
DocumentDictionaryFactory address string true true 10   suggest  

Please let me know if you need any more information in order to answer this?
Thanks,
Kehan