← Back to team overview

ubuntu-appstore-developers team mailing list archive

Re: Translations of metadata

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 26/06/13 14:56, Martin Albisetti wrote:
> On Wed, Jun 26, 2013 at 6:31 AM, James Tait
> <james.tait@xxxxxxxxxxxxx> wrote:
>> 
>> The localisation is on the fieldType, not the field itself.  So
>> we need to declare a fieldType for each of the languages Solr
>> supports that we want to make available, then declare a field per
>> language for each of the localisable fields.
>> 
>> For the user-facing portion of this, I propose something like
>> the following:
>> 
>> - If the query specifies a localisation (e.g.
>> q=description_en:foo), we should use it. - Similarly, if a
>> specific localised result field is requested (e.g. 
>> fl=description_en), we should use it. - In the general case,
>> clients should use the non-localised field name in queries
>> (q=description) and result fields (fl=description) and provide an
>> Accept-Language header, which we will use to choose the localised
>> variant.
>> 
>> This keeps the query API flexible, but avoids unnecessary
>> complexity in the general case.
> 
> 
> Does this mean that the client needs to explicitly tell us which 
> fields it's searching? I assume it can be more than one field at
> the same time in that case?  I don't know what the plan is for the
> client (hi Robert! Hi Alecu!), but I would expect the general case
> to search against all fields.

The Solr query syntax is quite rich, so we can search against multiple
fields if we want.

But I don't think the client guys should need to worry about that - we
have a multiValued field called "text" plonked at the end of the
schema that doesn't currently do anything.  The intention is to
copyField all the searchable fields into that.  It looks like we'll
need to add localised versions of it as well, but the principle
remains the same.

JT
- -- 
James Tait, BSc. | https://launchpad.net/~jamestait/
Software Engineer, Canonical Online Services, Web and Ops Team
Ubuntu - Linux for human beings | www.ubuntu.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlHK9WgACgkQyDo4xMNTLia/1gCfbjGBTFg1wPY3JyM5ngMPFHAt
GWIAnioTfxGzuMgjhJJe+2Bf55W0G59O
=jKWi
-----END PGP SIGNATURE-----


Follow ups

References