<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<pre wrap="">Hello,
the parameters.yml needs the name of the connection , like this:
parameters.yml
parameters:
<b>default:</b>
database_driver: pdo_pgsql
database_host: localhost
database_port: 5432
database_name: mapbender3
database_path: ~
database_user: postgres
database_password: [don't show your passwords!]
<b>search_db</b>:
database2_driver: pdo_pgsql
database2_host: localhost
database2_port: 5432
database2_name: search_db
database2_path: ~
database2_user: postgres
database2_password: [don't show your passwords!]
Your connection is missing parameters:
doc.mapbender3.org/en/bundles/Mapbender/CoreBundle/elements/search_router.html
class: Mapbender\CoreBundle\Component\SQLSearchEngine
class_options:
connection: search_db
<b>relation: picckad (это таблица public.</b><b>)</b> this looks wrong --> is this your table name? <span class="c1"># Relation to select from, you can use subqueries</span>
attributes:
- picnum
<b>- gid</b>
geometry_attribute: geom
form:
picnum:
type: text
options:
required: true
<b> label: Name
compare: ilike #both sides are considered as result</b>
results:
view: table
count: true
headers:
<b> picnum: Name</b><b>
</b><b> gid: ID</b>
callback:
event: click
options:
buffer: 10
minScale: null
maxScale: null
Try this : )
I hope it works now
</pre>
<div class="moz-cite-prefix">Am 11.11.2016 um 13:07 schrieb Den:<br>
</div>
<blockquote cite="mid:1478866074290-5295321.post@n6.nabble.com"
type="cite">
<pre wrap="">Good day!
I'm new to Mapbender. Learn how to create customize and publish applications
but can not configure the search for their data.
There search_db database. It table in which one field with values - picckad.
The values of the numbers but the field type is Text. (I tried to give the
field of type Integer)
The database was created in PgAdmin and data loaded into it from a SHP file
through Qgis
config.yml Files and parameters.yml look like
config.yml
doctrine:
dbal:
default_connection: default
connections:
default:
driver: %database_driver%
host: %database_host%
port: %database_port%
dbname: %database_name%
path: %database_path%
user: %database_user%
password: %database_password%
charset: UTF8
logging: %kernel.debug%
profiling: %kernel.debug%
search_db:
driver: %database2_driver%
host: %database2_host%
port: %database2_port%
dbname: %database2_name%
path: %database2_path%
user: %database2_user%
password: %database2_password%
charset: UTF8
logging: %kernel.debug%
profiling: %kernel.debug%
parameters.yml
parameters:
database_driver: pdo_pgsql
database_host: localhost
database_port: 5432
database_name: mapbender3
database_path: ~
database_user: postgres
database_password: n36rp21
database2_driver: pdo_pgsql
database2_host: localhost
database2_port: 5432
database2_name: search_db
database2_path: ~
database2_user: postgres
database2_password: n36rp21
route-configuration in the configuration area
class: Mapbender\CoreBundle\Component\SQLSearchEngine
class_options:
connection: search_db
relation: picckad (это таблица public.)
attributes:
- picnum
geometry_attribute: geom
form:
picnum:
type: text
options:
required: true
compare: exact
results:
view: table
count: true
headers:
picnum: Name
callback:
event: click
options:
buffer: 10
minScale: null
maxScale: null
The result is - No results found.
The debugger Google hrome found this:
Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and
will be removed in a future version. To avoid this warning set
'always_populate_raw_post_data' to '-1' in php.ini and use the php://input
stream instead. in Unknown on line 0
Warning: Cannot modify header information - headers already sent in Unknown
on line 0
Mapbender version 3.0.5.3
Failed to start the session because headers have already been sent by "" at
line 0.
What am I doing wrong?
--
View this message in context: <a class="moz-txt-link-freetext" href="http://osgeo-org.1560.x6.nabble.com/I-can-not-adjust-SearchRouter-Please-help-tp5295321.html">http://osgeo-org.1560.x6.nabble.com/I-can-not-adjust-SearchRouter-Please-help-tp5295321.html</a>
Sent from the mapbender-users mailing list archive at Nabble.com.
_______________________________________________
Mapbender_users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Mapbender_users@lists.osgeo.org">Mapbender_users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapbender_users">http://lists.osgeo.org/mailman/listinfo/mapbender_users</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Mit freundlichen Grüßen
Charlotte Toma
GIS-Consultant
********************************************
Where2B Konferenz 2016
15. Dezember 2016 in Bonn
<a class="moz-txt-link-abbreviated" href="http://www.where2b-conference.com">www.where2b-conference.com</a>
********************************************
Charlotte Toma
WhereGroup GmbH & Co.KG
Eifelstraße 7
53119 Bonn
Germany
Fon: +49(0)228 90 90 38 - 24
Fax: +49(0)228 90 90 38 - 11
<a class="moz-txt-link-abbreviated" href="mailto:charlotte.toma@wheregroup.com">charlotte.toma@wheregroup.com</a>
<a class="moz-txt-link-abbreviated" href="http://www.wheregroup.com">www.wheregroup.com</a>
Folgen Sie der WhereGroup auf twitter: <a class="moz-txt-link-freetext" href="http://twitter.com/WhereGroup_com">http://twitter.com/WhereGroup_com</a>
Amtsgericht Bonn, HRA 6788
-------------------------------
Komplementärin:
WhereGroup Verwaltungs GmbH
vertreten durch:
Olaf Knopp, Peter Stamm
------------------------------- </pre>
</body>
</html>