Forum Replies Created

  • wpsolr
    Keymaster
    6 years, 9 months ago in reply to: v20.8 facets issue with classnames #15957

    Thanks for the feedback.

    wpsolr
    Keymaster
    6 years, 9 months ago in reply to: v20.8 facets issue with classnames #15928

    Here is an extract from facet class on /wpsolr/search (WPSOLR 21.8):
    wpsolr_facet_class_C17187274AFF0A39A144307C73F8805D wpsolr_facet_radiobox wpsolr_facet_skin_none wpsolr_facet_type wpsolr_facet_scroll

    Do you have custom code interacting with facets?

    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: download link not available #15919

    #96292706 is an order for a monthly subscription, expired on Aug 28, 2019, because not renewed.

    • This reply was modified 6 years, 10 months ago by wpsolr.
    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: download link not available #15916

    This subscription has expired.

    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: V20.1 #15913

    Try to debug the error message “The search index is missing” in file /wpsolr/core/classes/extensions/indexes/class-wpsolr-option-indexes.php

    You should be able to understand why the index uuid $solr_index_indice is looked for, but not found in the indexes settings option.

    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: V20.1 #15911

    So, we have 2 sites, with their own settings as expected.

    But the real-time indexing throws a “missing” index error on both sites.

    What about the search. Can you see results with facets on both sites?

    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: V20.1 #15904

    It seems you are running a cross-domain search: all sites share the same index.

    Blog 2 and 10 index uuids are different (hence they have their own index settings), but point to the same local Solr index “keyRemoved”. Check wether the settings in screen 2.1 are set to the cross-domain network mode.

    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: Deeper into _product_attributes field #15900

    It can only be some custom php code, as nothing can detect that this custom field is in fact an array of custom fields to be indexed on their own.

    You can inspire from the ACF add-on, which uses a filter to add indexed fields from repeater fields.

    In wp-content/plugins/wpsolr-pro/wpsolr/pro/extensions/acf/class-wpsolr-plugin-acf.php:

    Make your fields appear in screen 2.2:

    add_filter( WPSOLR_Events::WPSOLR_FILTER_INDEX_CUSTOM_FIELDS, [
    	$this,
    	'get_index_custom_fields',
    ], 10, 2 );
    
    /**
     * Update custom fields list to be indexed
     * Replace _groupRepeater_0_repeatedFieldName by repeatedFieldName
     *
     * @param string[] $custom_fields
     * @param string $model_type
     *
     * @return string[]
     */
    function get_index_custom_fields( $custom_fields, $model_type ) {
    
    	if ( ! isset( $custom_fields ) ) {
    		$custom_fields = [];
    	}
    
    	$fields = $this->get_acf_fields();
    
    	$results = [];
    
    	$indexable_acf_fields = [
    		/**
    		 * ACF field types 'Content'
    		 */
    		self::ACF_FIELD_TYPE_CONTENT_WYSIWYG,
    		/**
    		 * ACF field types 'Layout'
    		 */
    		self::ACF_FIELD_TYPE_LAYOUT_TAB,
    		self::ACF_FIELD_TYPE_LAYOUT_CLONE,
    		/**
    		 * ACF field types 'Choice'
    		 */
    		self::ACF_FIELD_TYPE_CHOICE_TRUE_FALSE,
    		self::ACF_FIELD_TYPE_CHOICE_SELECT,
    		self::ACF_FIELD_TYPE_CHOICE_CHECKBOX,
    		self::ACF_FIELD_TYPE_CHOICE_RADIOBOX,
    		/**
    		 * ACF field types 'Basic'
    		 */
    		self::ACF_FIELD_TYPE_BASIC_TEXT,
    		self::ACF_FIELD_TYPE_BASIC_TEXTAREA,
    		self::ACF_FIELD_TYPE_BASIC_NUMBER,
    		self::ACF_FIELD_TYPE_BASIC_PASSWORD,
    		self::ACF_FIELD_TYPE_BASIC_URL,
    		self::ACF_FIELD_TYPE_BASIC_EMAIL,
    		/**
    		 * ACF field type 'jQuery'
    		 */
    		self::ACF_FIELD_TYPE_GOOGLE_MAP,
    		self::ACF_FIELD_TYPE_DATE_PICKER,
    		//self::ACF_FIELD_TYPE_DATE_TIME_PICKER,
    		//self::ACF_FIELD_TYPE_TIME_PICKER,
    	];
    
    	foreach ( $custom_fields as $custom_field_name ) {
    
    		$do_not_include = false;
    
    		if ( isset( $fields[ self::FIELD_PREFIX . $custom_field_name ] ) || isset( $fields[ $custom_field_name ] ) ) {
    
    			$field_key = isset( $fields[ self::FIELD_PREFIX . $custom_field_name ] ) ? $fields[ self::FIELD_PREFIX . $custom_field_name ] : $fields[ $custom_field_name ];
    			$field     = get_field_object( $field_key, false, false, false );
    
    			if ( $field ) {
    
    				$do_not_include = true;
    
    				if ( in_array( $field['type'], $indexable_acf_fields ) ) {
    
    					/**
    					 * Get the canonical form of a repeated field name, eventually.
    					 * Examples:
    					 * _xxxxx_0_field => field
    					 * __xxxxx_0__field => field
    					 * xxxxx_0_field => field
    					 * _xxxxx_10_field => field
    					 * _xxxxx_yy_field => _xxxxx_yy_field
    					 * xxxxx_yy_field => xxxxx_yy_field
    					 * field => field
    					 */
    					$repeated_field_name = preg_replace( '/(.*)_(\d*)_(.*)/', '$3', $custom_field_name );
    
    					if ( ! in_array( $repeated_field_name, $results, true ) ) {
    						// Add the non repeated field name, or the repeated field canonical name.
    						array_push( $results, $repeated_field_name );
    					}
    				}
    			}
    		}
    
    		if ( ! $do_not_include && ! in_array( $custom_field_name, $results, true ) ) {
    			// Add the non repeated field name, or the non ACF field name.
    			array_push( $results, $custom_field_name );
    		}
    	}
    
    	return $results;
    }
    

    Then set your fields value at index time:

    add_filter( WPSOLR_Events::WPSOLR_FILTER_POST_CUSTOM_FIELDS, [
    	$this,
    	'filter_custom_fields',
    ], 10, 2 );
    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: Index #15897

    It then should work, as described in /forums/topic/facets-are-not-visible-on-custom-taxonomy-archive-pages/

    wpsolr
    Keymaster

    By default, Elasticsearch can scroll 10,000 results, hence this error.

    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: Speed sugestions #15884

    Most of the time is probably spent in the admin-ajax.php which loads all WP code. Basically, your suggestions will go as fast as a single page (with no cache).

    I’ve seen 200ms as the fastest with keywords, and 600 ms with content.

    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: Index #15881
    wpsolr
    Keymaster

    Do you see errors in debug.log?

    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: Speed sugestions #15878

    For keyword suggestions or content suggestions?

    wpsolr
    Keymaster
    6 years, 10 months ago in reply to: Query syntax and examples using your plugin? #15859

    Solr syntax is not active on user front-end, because too technical. You can check on Amazon or other big websites.

    Keyword autocompletion can give you the keywords from partial words.

    Or you can activate the partial search option in WPSOLR settings, or even the fuzzy search. You can also configure your index with more advanced analysers than the default installed. For instance https://lucene.apache.org/solr/guide/6_6/tokenizers.html#Tokenizers-N-GramTokenizer

Viewing 15 posts - 2,521 through 2,535 (of 3,679 total)