Bernd, thanks for the hint - so  the style rule can be useful to other non-latin countries,  with a proper stop word list to avoid indexing not-meaningful words.

In any case - by including a proper list of ignore words per country to limit index size and if the issue I highlighted earlier in this email is solved - the mixed index appears to be the proper final solution to me,  without the need to have any additional style rule .  Did I get it right that with the mixed index all the words (except if in ignore list) are indexed as single words? Is there a limit in the number of words for a single street? (there might be streets with 6/7 words, using blanks, apostrophes or dashes as separator). 

On the other side, I like the current output I get with my style rule, where a user can get the street full name also when searching with a single word, that's what I seem to miss with the mixed-index.

Enrico

On Mon, Jan 12, 2015 at 12:19 PM, Bernd Weigelt <weigelt.bernd@web.de> wrote:
Am Sonntag, 11. Januar 2015, 22:11:43 schrieb Enrico Liboni:
> Pls. let me know your point,

Hi Enrico

when playing around with your rules, i have seen that in the german speaking
parts of Italy, Switzerland. France, Luxembourg and Belgium a lot of streets
are tagged with 'An, Zum, In, ...' This parts of the name are also useless for
searching by name.

But if i add
  mkgmap:country=LUX |
  mkgmap:country=DEU |
  mkgmap:country=BEL |
  mkgmap:country=AUT
to the country list, i got lots of list entries like
  Straße, Kieler
  Weg, Bonner
  ...

This are my changes

###
# Get the last full word if a \s (whitespace) exist in name
# if the last full word is a roman number - i.e. if a street has been named
after a King or
# a Pope - get the last two words
# set the labels used for address search (3&4):
# the 3rd label  is set with the last:word as 1st word followed by comma and
the remaining words
# the 4th label skipping the 1st word (that is usually Via, Rue, Avenida etc,
so not really useful in search)

( mkgmap:country=ITA |
  mkgmap:country=FRA |
  mkgmap:country=CHE |
  mkgmap:country=ESP |
  mkgmap:country=BEL |
  mkgmap:country=LUX |
  mkgmap:country=DEU |
  mkgmap:country=AUT
  )
  & highway=*
  & name ~ '.*\s.*'
  { set last:word='${name|part: :-1}' }

# the ignore list should be greater
last:word=*
  & (
     last:word = Straße|
     last:word = Weg|
     last:word = Ring|
     last:word = Platz|
     last:word = Straat|
     last:word = Laan
     )
        { delete last:word }

last:word ~ '(I|II|III|IV|V|VI.*|IX|X|XI.*|XV.*|XX.*)'
  {set last:word='${name|part: >-3}' }

last:word=*
  { set mkgmap:label:3='${last:word}, ${name|part: <-1}';
    set mkgmap:label:4='${name|part: >1}'
    }

# only for the tests
last:word=*
  {echo '${mkgmap:label:1} | ${mkgmap:label:2} | ${mkgmap:label:3} | \
${mkgmap:label:4}';
  echotags ''}
###


the result is something like that:

320136003: Am Stadtpark | null | Stadtpark, Am  | Stadtpark
320136003 - [mkgmap:admin_level6=Rheinisch-Bergischer
Kreis,mkgmap:admin_level5=Regierungsbezirk Köln,name=Am
Stadtpark,mkgmap:postal_code=42799,mkgmap:postcode=42799,mkgmap:street=Am
Stadtpark,route_ref=255,694,255,highway=residential,
mkgmap:country=DEU,mkgmap:admin_level2=DEU,last:word=Stadtpark,
mkgmap:label:3=Stadtpark, Am ,mkgmap:label:1=Am
Stadtpark,mkgmap:admin_level4=Nordrhein-
Westfalen,mkgmap:city=Leichlingen,mkgmap:region=Nordrhein-
Westfalen,mkgmap:admin_level8=Leichlingen,mkgmap:label:4=Stadtpark ]



--
amarok2 now playing:
artist: Lemar
title: Don't Give It Up
album: Time To Grow

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev