Coder Social home page Coder Social logo

pimcore / advanced-object-search Goto Github PK

View Code? Open in Web Editor NEW
39.0 16.0 43.0 682 KB

Advanced Object Search community bundle provides advanced object search in Pimcore backend powered by OpenSearch.

License: Other

PHP 60.79% CSS 0.54% JavaScript 38.67%

advanced-object-search's Introduction

title
Advanced Object Search

Pimcore Advanced Object Search via OpenSearch

Advanced Object Search bundle provides advanced object search in Pimcore backend powered by OpenSearch.

Integration into Pimcore

Installation and Configuration

Follow Installation instructions.

Configure OpenSearch Client

OpenSearch client configuration takes place via Pimcore OpenSearch Client Bundle and has two parts.

  1. Configuring an OpenSearch client.
  2. Define the client to be used by advanced object search.
# Configure an OpenSearch client 
pimcore_open_search_client:
    clients:
        default:
            hosts: ['https://opensearch:9200']
            password: 'admin'
            username: 'admin'
            ssl_verification: false


# Define the client to be used by advanced object search
advanced_object_search:
    client_name: default  # default is default value here, just need to be specified when other client should be used.

If nothing is configured, a default client connecting to localhost:9200 is used.

Configure Advanced Object Search

Before starting, setup at least following configuration in symfony configuration tree:

advanced_object_search:
    # Prefix for index names
    index_name_prefix: 'advanced_object_search_'

For further configuration options follow the docs and the inline description of the configuration tree.

Initial Indexing

Call Pimcore command advanced-object-search:update-mapping for creating mappings and advanced-object-search:re-index for indexing data for the first time.

GUI

GUI for creating searches against search index with

  • saving functionality
  • sharing functionality

Screen

Plugin Hooks

Following event listeners are called automatically

  • pimcore.dataobject.postUpdate - data object is updated in search index, all child objects are added to update queue.
  • pimcore.dataobject.preDelete - data object is deleted from search index.
  • pimcore.class.postUpdate - search index mapping is updated or index recreated if necessary.

Pimcore Console

Functions in Pimcore console.

  • advanced-object-search:process-update-queue --> processes whole update queue of es search index.
  • advanced-object-search:re-index --> Reindex all data objects of given class. Does not delete index first or resets update queue.
  • advanced-object-search:update-mapping --> Deletes and recreates mapping of given classes. Resets update queue for given class.

For details see documentation directly in Pimcore console.

Pimcore Maintenance & Symfony Messenger

By default, with every Pimcore maintenance call, 500 entries of update queue are processed. As an alternative, you also can activate symfony messenger to process the update queue. For that, just activate it as follows.

 advanced_object_search:
    messenger_queue_processing:
        activated: true

If activated, the processing is kicked off automatically with the advancedobjectsearch_update_queue maintenance task.

Messages are dispatched via pimcore_index_queues transport. So make sure, you have workers processing this transport when activating the messenger based queue processing.

API Methods

Create Mapping for data object classes

Per data object class one index with one document type is created.

<?php
/**
* @var \AdvancedObjectSearchBundle\Service $service
 */
$service = $this->get("AdvancedObjectSearchBundle\Service");
$service->updateMapping(ClassDefinition::getByName("Product"));

Update index data

On data object save or via script:

<?php
/**
* @var \AdvancedObjectSearchBundle\Service $service
 */
$service = $this->get("AdvancedObjectSearchBundle\Service");

$objects = Product::getList();
foreach($objects as $object) {
    $service->doUpdateIndexData($object);
}

Search/Filter for data

<?php
/**
* @var \AdvancedObjectSearchBundle\Service $service
 */
$service = $this->get("AdvancedObjectSearchBundle\Service");

//filter for relations via ID
$results = $service->doFilter(3,
    [
        new FilterEntry(
            "objects",
            [
                "type" => "object",
                "id" => 75
            ],
            BoolQuery::SHOULD
        )
    ],
    ""
);



//filter for relations via sub query
$results = $service->doFilter(3,
    [
        [
            "fieldname" => "objects",
            "filterEntryData" => [
                "type" => "object",
                "className" => "Customer",
                "filters" => [
                    [
                        "fieldname" => "firstname",
                        "filterEntryData" => "tom"
                    ]
                ]
            ]
        ],

    ],
    ""
);


// full text search query without filters
$results = $service->doFilter(3,
    [],
    "sony"
);


// filter for several attributes - e.g. number field, input, localized fields
$results = $service->doFilter(3,
    [
        [
            "fieldname" => "price",
            "filterEntryData" => 50.77
        ],
        [
            "fieldname" => "price2",
            "filterEntryData" => [
                "gte" => 50.77,
                "lte" => 50.77
            ]
        ],
        [
            "fieldname" => "keywords",
            "filterEntryData" => "test2",
            "operator" => BoolQuery::SHOULD
        ],
        [
            "fieldname" => "localizedfields",
            "filterEntryData" => [
                "en" => [
                    "fieldname" => "locname",
                    "filterEntryData" => "englname"
                ]
            ]
        ],
        [
            "fieldname" => "localizedfields",
            "filterEntryData" => [
                "de" => [
                    "fieldname" => "locname",
                    "filterEntryData" => "deutname"                
                ]
            ]
        ],
        new FilterEntry("keywords", "testx", BoolQuery::SHOULD)
    ],
    ""
);

Not Supported Data Types

Currently following data types are not supported - but can be added if needed in future versions:

  • ClassificationStore
  • Slider
  • Password
  • Block
  • Table
  • StructuredTable
  • Geographic data types
  • Image data types

Integrate new Data Type

  • Implement Field Definition Adapter by implementing the IFieldDefinitionAdapter interface.
  • Register new Field Definition Adapter as service
  • Add mapping in configuration like
advanced_object_search: 
    field_definition_adapters:
        newDataTypeName: SERVICE_ID_OF_FIELD_DEFINITION_ADAPTER

Extend Filters in the Result Tab

If you want custom filters in the result tab directly without having to create a new advanced object search every time read here on how to extend the result tab with custom filters.

advanced-object-search's People

Contributors

aashan10 avatar aryaantony92 avatar bluvulture avatar brusch avatar danmichaelo avatar dvesh3 avatar elements-team avatar fashxp avatar jdreesen avatar kingjia90 avatar lukmzig avatar maff avatar maksonis avatar markus-moser avatar martineiber avatar mattamon avatar mbolka avatar mcassier31 avatar mcop1 avatar robertst7 avatar ruudvdvnb avatar skoch98 avatar studio1gmbh-pimcore avatar valentin- avatar vmalyk avatar w473 avatar webdev-dp avatar weisswurstkanone avatar wisconaut avatar wujku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

advanced-object-search's Issues

Feature Request: Block Indexing

Hey there, thank you for the amazing plugin. I am planning on using it on a current project :)
I would like to be able to search for objects based on data contained in Block. for my specific use case; I have Blocks which contain a handful of fields, with information and certifications, and product SKU numbers. There are usually 10 of these blocks or so, on each object. I am certain that customers will come to the site searching for their specific SKU instead of the more generic product number.

Example data structure:
in this structure the skus are blocks containing text input fields.
{ "productNumber": "T1X50", "skus": [ { "sku": "T1X50-US", "countries": "US,CA,MX", "MSRP": "1526.00", "channel": "Rinco" }, { "sku": "T1X50-BR", "countries": "BR", "MSRP": "1226.00", "channel": "PaoCa" }] }

Is it reasonable to ask for this feature? And if not, what can I do to help out getting this feature implemented?

Request URL too Long

After updating to latest pimcore I am getting Request too long error in Advanced object search.
image

Error on publish checkbox click

After click I got error : http://prntscr.com/mie9t7

Timestamp: Fri Feb 08 2019 17:03:22 GMT+0300 (Москва, стандартное время)
Status: 500 | Internal Server Error
URL: /admin/bundle/advanced-object-search/admin/grid-proxy?classId=1&xaction=update&_dc=1549634602145
Method: POST
Message: The _controller value "PimcoreAdminBundle:Admin\DataObject:gridProxy" maps to a "Pimcore\Bundle\AdminBundle\Controller\Admin\DataObjectController" class, but this class was not found. Create this class or check the spelling of the class and its namespace.

Issue is related with path /admin/grid-proxy added after /admin/bundle/advanced-object-search/

Elastic 7 error when rebuilding class

Getting error while running classes-rebuild command or saving classes

  [Elasticsearch\Common\Exceptions\BadRequest400Exception (400)]                                                                                                                                           
  {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."}],"type":"illegal_argu  
  ment_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."},"status":400}  

Error on add columns in Grid Options

After open "Grid Options" I got exception http://prntscr.com/mie86c:

Timestamp: Fri Feb 08 2019 16:56:24 GMT+0300 (Москва, стандартное время) Status: 500 | Internal Server Error URL: /admin/object/grid-proxy?classId=undefined&folderId=undefined Method: POST Message: Call to a member function getName() on null

Might it be related with undefined values for classId and folderId

Bug in Service.php --> Release new version

Hey,

I just came across this already fixed bug d23b979#diff-16a921c287a57770d0ab59c0fb771b5d in the Service.php doFilter() function and wanted to report it.

As it's already fixed, can you please release it as a new version so I can update via composer?

Thanks :-)

PS: Any plans on moving to ElasticSearch 6? Right now it doesn't work with ES6 since it uses different types for e.g. a textfield [string vs. text].

ElasticSearch 7.x support

Hello,

Is there a planned version of this plugin supporting ElasticSearch 7.x ?
I have this error with the mapping creation console command :

  {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Types cannot be provided in put mapping requests, unless the include_type_name parameter is set to true."}],"type":"illegal_argument_exception","reason":"Types cannot be provided in put mapping r
  equests, unless the include_type_name parameter is set to true."},"status":400}

Best regards,
Fred

Is not a function in resultpanel.js.

  • I am getting Error while generating results on console as
    this.buildColumnConfigMenu(); is not a function.
    In resultPanel.js at line no 238;

Any Solutions??

Operators in results grid

In the results grid it's possible to change the column configuration. The operators that can be selected/added do work the first time, but when you reopen the column configuration there is a blank column instead and loses it's configuration.

Get only product whitout variants

Hello, I tried to get only product whitout variants, but I have a error. In my case a product that is not variant has suppliers = NULL.
Screenshot from 2019-07-18 14-26-16

My code :

 return $this->advancedObjectSearchService->doFilter(14,
            [
                new FilterEntry("suppliers", "NULL")
            ],
            "");

The error is :

"invalid filter entry for relations filter: NULL"

Get object relation with properties

Hello guys, I have a relation to supplier from CoreshopProduct. Something like that :
Screenshot from 2019-07-12 17-49-44

And from supplier I have relation to product :
Screenshot from 2019-07-12 17-51-07

But when I trying to get products like this :

eturn $this->advancedObjectSearchService->doFilter(14,
                [
                    new FilterEntry(
                        "categories",
                        [
                            "type" => "object",
                            "id" => $category->getId()
                        ],
                        BoolQuery::SHOULD
                    )
                ],
                ""
            );

I don't have all properties of supplier like : name, city, etc. I have only the id
Screenshot from 2019-07-12 17-53-23

Have you an idea about that ?

Custom mapping

Hi,

I would like to know of custom object mapping is possible? I like to use the same schema that is being used by VUE JS storefront.

Increase default index total_fields limit

The default limit of elasticsearch is 1000. Sometimes that's not enough and as side effects very strange things could happen. Therefore the default limit should be increased.

Error when getting object by id

Hello,
I tried to get an object by id but I get an error :
My code :

$results = $service->doFilter(17,
            [
                new FilterEntry(
                    "objects",
                    [
                        "type" => "object",
                        "id" => 75
                    ],
                    BoolQuery::SHOULD
                )
            ],
            ""
        );

The error :

 Type error: Argument 1 passed to AdvancedObjectSearchBundle\Service::getFieldDefinitionAdapter() must be an instance of Pimcore\Model\DataObject\ClassDefinition\Data, boolean given

Have you an idea about that ? thx in advance.

Error while Saving/Updating Object due to Length

While trying to update or save the object I am getting following error:

[DEBUG][o.e.a.b.TransportShardBulkAction] [b-cA5Xc] [object_scholarship][4] failed to execute bulk item (index) BulkShardRequest [[object_scholarship][4]] containing [index {[object_scholarship][Scholarship][115741], source[n/a, actual length: [73.1kb], max length: 2kb]}] java.lang.IllegalArgumentException: Document contains at least one immense term in field="availableZipCodes.raw" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped. Please correct the analyzer to not produce such terms. The prefix of the first immense term is: '[54, 48, 48, 48, 49, 44, 54, 48, 48, 48, 50, 44, 54, 48, 48, 48, 52, 44, 54, 48, 48, 48, 53, 44, 54, 48, 48, 48, 54, 44]...', original message: bytes can be at most 32766 in length; got 72149 at org.apache.lucene.index.DefaultIndexingChain$PerField.invert(DefaultIndexingChain.java:806) ~[lucene-core-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241 - ishan - 2017-05-30 07:29:46] at org.apache.lucene.index.DefaultIndexingChain.processField(DefaultIndexingChain.java:447) ~[lucene-core-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241 - ishan - 2017-05-30 07:29:46] at org.apache.lucene.index.DefaultIndexingChain.processDocument(DefaultIndexingChain.java:403) ~[lucene-core-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241 - ishan - 2017-05-30 07:29:46] at org.apache.lucene.index.DocumentsWriterPerThread.updateDocuments(DocumentsWriterPerThread.java:273) ~[lucene-core-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241 - ishan - 2017-05-30 07:29:46] at org.apache.lucene.index.DocumentsWriter.updateDocuments(DocumentsWriter.java:433) ~[lucene-core-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241 - ishan - 2017-05-30 07:29:46] at org.apache.lucene.index.IndexWriter.updateDocuments(IndexWriter.java:1384) ~[lucene-core-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241 - ishan - 2017-05-30 07:29:46] at org.apache.lucene.index.IndexWriter.addDocuments(IndexWriter.java:1360) ~[lucene-core-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241 - ishan - 2017-05-30 07:29:46] at org.elasticsearch.index.engine.InternalEngine.index(InternalEngine.java:661) ~[elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.index.engine.InternalEngine.indexIntoLucene(InternalEngine.java:607) ~[elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.index.engine.InternalEngine.index(InternalEngine.java:505) ~[elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.index.shard.IndexShard.index(IndexShard.java:556) ~[elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.index.shard.IndexShard.index(IndexShard.java:545) ~[elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.executeIndexRequestOnPrimary(TransportShardBulkAction.java:491) ~[elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.executeBulkItemRequest(TransportShardBulkAction.java:146) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:115) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:70) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryShardReference.perform(TransportReplicationAction.java:939) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryShardReference.perform(TransportReplicationAction.java:908) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.ReplicationOperation.execute(ReplicationOperation.java:113) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.onResponse(TransportReplicationAction.java:322) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.onResponse(TransportReplicationAction.java:264) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$1.onResponse(TransportReplicationAction.java:888) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$1.onResponse(TransportReplicationAction.java:885) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.index.shard.IndexShardOperationsLock.acquire(IndexShardOperationsLock.java:151) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.index.shard.IndexShard.acquirePrimaryOperationLock(IndexShard.java:1657) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction.acquirePrimaryShardReference(TransportReplicationAction.java:897) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction.access$400(TransportReplicationAction.java:93) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$AsyncPrimaryAction.doRun(TransportReplicationAction.java:281) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryOperationTransportHandler.messageReceived(TransportReplicationAction.java:260) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryOperationTransportHandler.messageReceived(TransportReplicationAction.java:252) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.transport.RequestHandlerRegistry.processMessageReceived(RequestHandlerRegistry.java:69) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.transport.TransportService$7.doRun(TransportService.java:644) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:638) [elasticsearch-5.5.3.jar:5.5.3] at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-5.5.3.jar:5.5.3] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_171] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_171] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_171] Caused by: org.apache.lucene.util.BytesRefHash$MaxBytesLengthExceededException: bytes can be at most 32766 in length; got 72149 at org.apache.lucene.util.BytesRefHash.add(BytesRefHash.java:263) ~[lucene-core-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241 - ishan - 2017-05-30 07:29:46] at org.apache.lucene.index.TermsHashPerField.add(TermsHashPerField.java:149) ~[lucene-core-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241 - ishan - 2017-05-30 07:29:46] at org.apache.lucene.index.DefaultIndexingChain$PerField.invert(DefaultIndexingChain.java:796) ~[lucene-core-6.6.0.jar:6.6.0 5c7a7b65d2aa7ce5ec96458315c661a18b320241 - ishan - 2017-05-30 07:29:46] ... 37 more

Call to a member function getAllowInherit() on null

I'm getting the following error when trying to add a condition in the search configurator.

Timestamp: Tue Jan 15 2019 10:29:51 GMT+0100 (centraleuropeisk normaltid)
Status: 500 | Internal Server Error
URL: /admin/bundle/advanced-object-search/admin/get-fields?_dc=1547544589822
Method: GET
Message: Call to a member function getAllowInherit() on null

The error happens in AdvancedObjectSearchBundle\Controller\AdminController because of these lines

$classId = intval($request->get("class_id"));
$definition = DataObject\ClassDefinition::getById($classId);
$allowInheritance = $definition->getAllowInherit();

All my classes have been created with string ids instead of a number. Because of this the intval(...) won't work.
Example: I have a class named Client with the id client. intval('client') returns 0 which in turn leads to no ClassDefintion being found.

Filter on localized fields not working

I tried to filter for some data which is stored in a localized field. When the search is executed, I get the following Exception:

grafik

This is my filter configuration:

$filters = [
	[
		"fieldname" => "visibleInWeb",
		"filterEntryData" => true,
		"operator" => BoolQuery::MUST,
	],
	[
		"fieldname" => "o_published",
		"filterEntryData" => true,
		"operator" => BoolQuery::MUST,
	],
	[
		"fieldname" => "localizedfields",
		"filterEntryData" => [
			"de" => [
				"searchName" => "test123"
			]
		]
	]
];

$results = $service->doFilter("pimproduct",
	$filters,
	"",
	$offset,
	$articlePerPage
);

It seems that the search term "test123" is threated as separate filter configuration in vendor\pimcore\advanced-object-search\src\Service.php:643. Because it's only a string, an Exception is thrown.

Deprecation warning: accessing private service from container in Symfony 3.4.*

Pimcore version: "pimcore/core-version": "v5.1.2"
Symfony version: "symfony/symfony": "3.4.*"

Hi, when running the re-index command I see the following deprecation warning:

User Deprecated: The "bundle.advanced_object_search.filter.default" service is private, getting it from the container is deprecated since Symfony 3.2 and will fail in 4.0. You should either make the service public, or stop using the container directly and use dependency injection instead.

This is due to services being private by default since Symfony 3.4 (see https://symfony.com/blog/new-in-symfony-3-4-services-are-private-by-default) and it is recommended to either make it public (possible code smell) or inject it.

The affected lines are for instance in AdvancedObjectSearchBundle\Service line 86ff.

public function getFieldDefinitionAdapter(ClassDefinition\Data $fieldDefinition, bool $considerInheritance) {
        $adapter = null;

        try {
            $adapter = $this->container->get("bundle.advanced_object_search.filter." . $fieldDefinition->fieldtype);
        } catch (\Exception $exception) {
            $adapter = $this->container->get("bundle.advanced_object_search.filter.default");
        }

        $adapter->setConsiderInheritance($considerInheritance);
        $adapter->setFieldDefinition($fieldDefinition);

        return $adapter;
    }

Probably not desired to inject all Filters here, so maybe make the services public?

Horizontal scroll while building queries

Hi,

When we are building search queries (conditions/groups) it sometimes happens that the screen width is to small. The operator or value fields fall off the window and it's not possible to use a horizontal scroll.

Is it possible to enable the horizontal scrolling?

Filter on objectbrick not working

After upgrading Pimcore from 5.2 to 5.6 we can no longer create conditions containing object bricks. Advanced object search is version 1.8.0.

First we select the object brick field.
Then we select the object brick type. In this step we get the following js-error:

Uncaught TypeError: Cannot read property 'fieldname' of null
    at klass.<anonymous> (fieldcollections.js:99)
    at E.fire (ext-all.js:22)
    at E.doFireEvent (ext-all.js:22)
    at E.a.doFireEvent (ext-all.js:22)
    at E.fireEventArgs (ext-all.js:22)
    at E.fireEvent (ext-all.js:22)
    at E.onProxyLoad (ext-all.js:22)
    at E.triggerCallbacks (ext-all.js:22)
    at E.setCompleted (ext-all.js:22)
    at E.setSuccessful (ext-all.js:22)

The dropdown with fields from the object brick is populated but selecting a field gives another js-error:

Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at klass.getConditionPanel (quantityValue.js?_dc=1554795940:25)
    at klass.<anonymous> (fieldcollections.js?_dc=1554795940:139)
    at E.fire (ext-all.js?_dc=105b8cfa4ceb7545017adf73980de722d0033eb2:22)
    at E.doFireEvent (ext-all.js?_dc=105b8cfa4ceb7545017adf73980de722d0033eb2:22)
    at E.doFireEvent (ext-all.js?_dc=105b8cfa4ceb7545017adf73980de722d0033eb2:22)
    at E.a.doFireEvent (ext-all.js?_dc=105b8cfa4ceb7545017adf73980de722d0033eb2:22)
    at E.fireEventArgs (ext-all.js?_dc=105b8cfa4ceb7545017adf73980de722d0033eb2:22)
    at E.fireEvent (ext-all.js?_dc=105b8cfa4ceb7545017adf73980de722d0033eb2:22)
    at E.checkChange (ext-all.js?_dc=105b8cfa4ceb7545017adf73980de722d0033eb2:22)

After this we do not get any further.

Many to many relation for variants

In the ManyToOne field definition adapter searches for object_ids are always added for the type 'object'. In some of our projects we also use variants and the type property in Elastic is set to 'variant' instead of 'object' which results in an empty search.

2 possible changes that can be made:

  1. Change the index task to set the type always to 'object' (ofcourse for objects...)
  2. Add 'variant' search as well in the getQueryPartinside ManyToOneRelation adapter

Feature request: config should follow symfony/pimcore rules for dev/prod

Currently, the advanced-object-search only read the config from "config.php".

Ist should detect and read (if given) the config files in conjunction with the enviroment (dev/prod).
This is usefull, to define different elasticsearch instances for dev and prod for example.

config_dev.php
config_prod.php
config.php

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.