solr,typo3,typoscript,typo3-6.2.x , TYPO3 Solr extension and facets


TYPO3 Solr extension and facets

Question:

Tag: solr,typo3,typoscript,typo3-6.2.x

I have a small question about TYPO3 solr facets.At present in my website I have 6 different indexing configuration available. Two of them are custom extension table's and one is tt_news and rest of the 3 are pages table with some custom condition. I managed to add this using additionalWhereClause . My requirement is add facets in front-end . I have manged to do this also . See below for the Typoscript

facets { 
    type {
        field = type
        renderingInstruction = CASE
        renderingInstruction {
            key.field = optionValue

            pages = TEXT
            pages.value = Search Units     

            search_units = TEXT
            search_units..value = Search Units   ( This is also pages but I can see this facets in frontend)  

            expertise_offered = TEXT
            expertise_offered.value = EXpertise 

            tt_news = TEXT
            tt_news.value = News

            user_xxxxxxxxxxx_event = TEXT
            user_xxxxxxxxxxx_event.value = XXXX Events

            user_xxxxxxxxxxxxx_officer = TEXT
            user_xxxxxxxxxxxxx_officer.value = XXXXX Officers 

        }   
    }  

In front end I can see only 4 facets , the 3 pages indexes are grouped into one. So my question is , Is it possible that we can separate these configuration and show them as independent facets in front-end ? ie the above configuration should return 6 facets in fornt-end .

Any help would be appreciated.


Answer:

I assume that your type-field in the solr index only has 4 values, one for pages, 1 each for the two custom tables, and 1 for news. In order to get 6 facets, you need to have 6 different values in the field the faceting is done on.

I'm not sure if you can define the value of the type-field for each indexing configuration (doesn't look that way when looking into the documentation).

Anyway, there is another way: Add another (dynamic) field to the documents, on which you can do the facetting:

  1. Add a new field in the fields part of each indexing configuration, using SOLR-type *_stringS (see Wiki of the extension for dynamic fields). That type does not do text analysis, so it should be usable for faceting.
  2. Change the field you do the faceting on to the new field.

Related:


Data import in solr from multiple entities


solr,dataimporthandler,data-import
Currently i have a Solr core, which is importing data from multiple entities, i.e 2 different MySQL tables. I have to import data in the same core through 3rd entity which is another core in the same Solr Database. I found a documentation on many different sites which were guiding...

How to assign variable in fluid?


typo3,fluid,view-helpers
I want viewhelper that can be helpful to assign variable in fluid, I dont want variable to be passed from controller.

Solr custom UpdateRequestProcessorFactory fails with “Error Instantiating UpdateRequestProcessorFactory”


java,solr,lucene,config,solrcloud
I have a custom class extending UpdateRequestProcessorFactory doing some work on a document when it gets added to the index. This was working fine in v4.10.3 in standalone Solr. I moved to SolrCloud v5.2 and it throws this error when adding the Collection (node): ERROR - 2015-06-14 12:25:11.071; [ docs_shard1_replica1]...

Getting application/json back from a Solr query


java,json,solr,jersey,jersey-client
I'm calling the Solr REST api using a Jersey client: final ClientResponse resp = client().path(queryPath()) .queryParam("q", query.getQuery()) .queryParam("wt", "json") .accept(MediaType.APPLICATION_JSON_TYPE) .get(ClientResponse.class); resp.getEntity(HttpResponse.class) and when I run it I get: A message body reader for Java class challenger.HttpResponse, and Java type class challenger.HttpResponse, and MIME media type text/plain; charset=UTF-8 was not...

solrException. XML parser doesn't support XInclude option


xml,tomcat,solr,lucene,xinclude
After configuring solr4.7.2 with tomcat 7, got the error in solrAdmin page stating SolrCore Initialization Failures fran92:org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: XML parser doesn't support XInclude option My solr.xml file contains one core <?xml version="1.0" encoding="UTF-8" ?> <solr persistent="true"> <cores host="${host:}" adminPath="/admin/cores" hostContext="${hostContext:solr}"> <core config="solrconfig.xml" name="fran92" instanceDir="generic" schema="schema.xml"...

Apache Solr Exception


php,apache,search,drupal,solr
Hello I am trying to run Solr on a Tomcat and have an exception like org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: directory '/var/lib/solr/data/index' does not exist Maybe anyone has some trouble like I do?...

How to add individual objects to django haystack?


django,solr,django-haystack
I have a search index that I have created using Solr. I want to add individual django objects to the search index. To remove objects from the solr database we use remove_object. some = SomFooModel.objects.get(pk=1) foo = FooIndex() foo.remove_object(some) #This works To add it, is there something like add_object or...

How to get Query object to felogin repository?


typo3,typo3-6.1.x
i need Query object of TYPO3\CMS\Felogin\Controller\FrontendLoginController in my extention repository so i can create my own query conditions.

Solr 5.1.0 - Apache TikaEntityProcessor Cannot Find My Files


mysql,solr,tika
Solr, more specifically Tika, is having some problems finding my file whose filepath is retrieved from a database. Whenever I go to index it logs errors saying that this can't find the file. I'm basically doing what this guy is doing here, which is taking a file path from a...

Solr 4.10.2 MySQL import fails with java.io.EOFException


mysql,solr
I'm trying to migrate a server with Solr 4.7.2 on it. I have a Solr 4.10.2 with 4 cores running which is the new machine. I have an importer running on the old machine that poses no problem. However, when trying to run the importer on the new machine, I...

tt_news single view with static news_id


typo3,tt-news
I am using Typo3 Version 6.2 with the plugin tt_news. All I want to do is: Have a simple page on my website On that page I want to have a tt_news single view the news_id of this view should be static (set by me) and NOT by GET variables...

TYPO3-Upgrade 4.5 to 6.2: namespaces


namespaces,typo3,typo3-6.2.x
I'm updating an old TYPO3 to latest verison 6.2.12. As I do so I replace deprecated classes with the proper namespaces. E.g. t3lib_div to \TYPO3\CMS\Core\Utility\GeneralUtility or t3lib_extmgm to \TYPO3\CMS\Core\Utility\ExtensionManagementUtility. But I cant find the proper namespaced class for t3lib_svbase. Any suggestions? . And I absolutely have no clue what I...

Solrcloud multicore configuration


solr,lucene,multicore,sharding,solrcloud
I have a standalone Solr instance with 4 different cores working fine using the embedded Jetty server. I configured the cores for v4.10.3 but since I moved to v5.1 and all seems to work fine without any changes. Before going into production, I need to set it up as a...

How can I sort by realtime score in solr?


solr
Now I have a solr collection: question question has some field: id answer_count created_at updated_at now I have the sort rule: score = answer_count * 100 - (the hours now to created_at) * 5 then I need to sort by the score desc. how can i do that because of...

Rails4 + sunspot search


mysql,ruby-on-rails,solr,sunspot
I am trying to use sunspot solr for searching with Rails 4 and mysql. I defined a searchable block in my model(eg XYZ): searchable do text :name, :stored => true string :id, :stored => true end I just want to search in "name". The "id" is the primary key. There...

Subentity SolrEntityProcessor stops working since SolR 5.x


solr,dataimporthandler,solr5
I use a data import like this <dataConfig> <document name="products"> <entity name="outer" dataSource="my_datasource" pk="id" query="..." deltaQuery="..." deltaImportQuery="..." > <entity name="solr" processor="SolrEntityProcessor" url="http://127.0.0.1:8983/solr/${solr.core.name}" query="Xid:${outer.Xid}" rows="1" fl="Id,FieldA,FieldB" wt="javabin" /> </entity> </document> </dataConfig> The interesting part is the sub entity, which uses SolrEntityProcessor. Until (including) SoLR 4.10 everything...

Solr Cloud Managed Resources


solr,solrcloud,synonym,stop-words
I am implementing Solr Cloud for the first time. I've worked with normal Solr and have that down pretty well, but I'm not finding a lot on what you can and can't do with Solr Cloud. So my question is about Managed Resources. I know you can CRUD stop words...

What indexer do I use to find the list in the collection that is most similar to my list?


search,indexing,solr,levenshtein-distance
Lets say I have my list of ingredients: {'potato','rice','carrot','corn'} and I want to return lists from a database that are most similar to mine: {'beans','potato','oranges','lettuce'}, {'carrot','rice','corn','apple'} {'onion','garlic','radish','eggs'} My query would return this first: {'carrot','rice','corn','apple'} I've used Solr, and have looked at CloudSearch, ElasticSearch, Algolia, Searchify and Swiftype. These engines only...

Solr 5.1.0: How to set the unique key via Schema API


solr,schema,unique-key
In Solr 5.1.0, is it possible to set the unique key via the REST schema api? I created a collection with the data driven schema. Solr would guess what the field type and create the field based on the data I upload. I can still define fields beforehand by sending...

Still seeing old shard after calling SPLITSHARD


solr
I called splitshard, and now this is what I see even after posting a commit: I thought splitshard was supposed to get rid of the original shard, shard1, in this case. Am I missing something? I was expecting the only two remaining shards to be shard1_0 and shard1_1. The REST...

Replace URLs in Typo3 DB


mysql,database,typo3
So I have a Site created with Typo3. I also have a domain which is linked to the folder of the Typo3 Installation. www.example.org I created a Subdomain and linked it to the same folder and used the Main Domain for something else. But now everything on the Subdomain still...

Is it possible to index views in Apache Solr


sql,view,solr
Let me first give you an example. I have two tables -table1 and table2. table1 has a field id_table2, which is a foreign key and references one of the fields in table2. So, when I want to scan table1, I make a query like: SELECT t1.attr_1_, t1.attr_2_, t2.attr_3_ FROM table1...

Developing a search and tag heavy website


sql,database,web-applications,solr,nosql
I'm in the planning phase of developing a very tag heavy website. Everything will essentially be associated with tags and the entire site would be based on searching these tags. Now, I've been thinking a lot about going the nosql route here, since from what I read and understand, it...

How to get typo3 settings in the utility files?


php,typo3,fluid,extbase
plugin.tx_xxx { setting { storagePid = 23 } } I want this typo3 settings in utility file. Please help me....

Language detection not working in Typo3 6.2.12


typo3,typoscript,typo3-6.2.x,language-detection
I've a website which has 2 languages: German (de) as default and English (en) as translated. I am trying to implement language detection functionality in the website using the extension "rlmp_language_detection" version 7.0.0. What I want to achieve is, for the countries Austria (at), Switzerland (ch) and Germany (de), the...

Django-Haystack with Solr: Searching by page description meta tags


solr,django-haystack,django-cms
I've been digging around and can't seem to find a way to create a search index for the page description meta tags using Haystack and Solr. Does anyone have experience with this, or any tips? I have looked at the page model in cms, but can't figure out how to...

Partially indexing Cassandra table with SOLR


solr,cassandra,datastax-enterprise
One of the tables inside our Cassandra (DSE 4.7) Cluster contains south of 15 billion records. With the number of servers we have - it would be impossible to index them all with Solr. So, is it possible to somehow index the data partially/sample and/or start indexing and then "pause"...

can solr find all of the terms of a field of a document?


solr,solrcloud,inverted-index
solr uses inverted index to find the document from the indexed "terms". but what I wonder is that - is there any approach to know all of the terms which refer to a specific documents? thanks...

Using schema.xml with Solr


xml,solr
I am trying to use schema.xml with the latest version of Solr (5.1.0). It seems that by default Solr 5.1.0 uses managed schema, but I would like to use schema.xml for a specific collection. So I create a new collection (using solr create -c my_collection on windows and copy schema.xml...

How to store the file path of an indexed document in Apache Solr 5.1.0


mysql,solr
I'm trying to store the file path of an locally stored indexed document in Apache Solr so I can then update the index with metadata that is stored in a DB in MySQL. That file path is how I'm going to relate the document to its corresponding metadata I already...

Typoscript add class to the first element using stdWrap


typo3,typoscript,typo3-6.2.x
I have a custom requirement to display an image slider using TypoScript. The images are taken from default tt_content image content element. I've added the following TypoScript code to implement this; lib.homeslider = COA lib.homeslider { 10 = CONTENT 10 { table = tt_content select { where = colPos =...

Hide typo3 content elements for specific user(groups)


typo3,typoscript
I want to "hide/deactivate" the table element for specific users/usergroups in the typo3 BE. Or to be more clear: I want to ONLY allow it to ONE specific user (admin). How can i do that? NOTE: At the moment the table element is deactivated in the global TS-config via tt_content...

Heap size issue on migrating from Solr 5.0.0 to Solr 5.1.0


solr,jvm
I have a Solr 5.0.0 in production with a custom heap size like this SOLR_JAVA_MEM="-Xms2g -Xmx2g" When I tried to migrate to Solr 5.1.0 with the same configuration and start the server it returned a OutOfMemoryError. Looking to the Solr API I saw that the heap size was set to...

Solr : stemming in a live cluster (reindexing issues)


solr,solr4,solrcloud
I have a live Solr cluster where stemming was not enabled and my schema.xml looks like this: .. <field name="Searchable_Text" type="text_general" indexed="true" stored="true" multiValued="false"/> .. <field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/> .. <copyField source="Searchable_Text" dest="text" maxChars="3000"/> .. <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer...

solrcloud - choosing cores for update and search requests


solr,solrcloud
I have a SolrCloud with one collection configured with compositeId and numShards=3 and replicationFactor=2. there will be about 200K inserts a day and about as many searches. from the SolrCloud documentation: "If the machine is a replica, the document is forwarded to the leader for processing." Does this means that...

How to use Hook “processDatamap_postProcFieldArray” in TYPO3 6.x


php,typo3,extbase,typo3-6.2.x
Use case: When saving an object (in backend, maybe in frontend too later) I want to manipulate values before saving to database. Problem: The file seems to get included (shows an error on save if I choose a wrong file path) but the function does not seem to be executed...

How does ReversedWildcardFilterFactory speed up wildcard searches?


solr,full-text-search
The Solr docs say: solr.ReversedWildcardFilterFactory A filter that reverses tokens to provide faster leading wildcard and prefix queries. Add this filter to the index analyzer, but not the query analyzer. The standard Solr query parser will use this to reverse wildcard and prefix queries to improve performance... How does it...

How do I combine Facet and FilterQueries using Spring data Solr?


spring,solr,filtering,facet
Is it possible to combine a facet and field query in spring data solr? Something that would build a query like this: > http://localhost:8983/solr/myCore/select?q=lastName%3AHarris*&fq=filterQueryField%3Ared&wt=json&indent=true&facet=true&facet.field=state In other words, how do I add FilterParameters to a SimpleFacetQuery? Any/all replies welcome, thanks in advance, -- Griff...

Fuzzy search not working with dismax query parser


solr,lucene
There is a field in my schema 'fullText' which is of the 'text_en' type, and multivalued. The term 'tests' is in the fullText field in one document. In solr, when I try to search using the word 'test', with the standard lucene parser with minimal distance 1, its returning the...

Heap memory Solr and Elasticsearch


solr,elasticsearch
I'm just reading the book Mastering Apache Solr and the writer recommends to set the minimum heap size (-Xms) to 2GB and the maximum heap size (-Xmx) to 12GB. Is 2GB necessary? I just use a 512MB server (which is low, I know) for Solr and I found it already...

Understanding Apache Lucene's scoring algorithm


search,solr,lucene,full-text-search,hibernate-search
I'm working with Hibernate Search for months now, but still I'm not able to digest the relevance it brings. I'm overall satisfied with the results it returns, but even simplest test does not satisfy my expectation. First test was using the term frequency(tf). Data: word word word word word word...

How to add multiple suggesters definition in solr search components


java,apache,solr,lucene,autosuggest
I am using solr 5.1. I am trying to configure multiple suggester definition in Solr search component according to Apache solr wiki. I have configured single suggester perfectly and it works perfect but whenever I try to configure multiple suggester it gives me following errors java.lang.NullPointerException at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:190) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)...

htaccess and authentication for multiple domains


.htaccess,typo3
I am running a mutlisite TYPO3-Site. For the pre-live process, I want to add a htaccess with a htpasswd for 3 / 4 sites. How can I configure the htaccess-file to trigger the authentication only for specific urls? For example: http://example.org shouldn't get a password-protection, while http://example2.org should. Both sites...

SOLR - highlight searching text ? Is this possible


solr,solrj,solr-highlight
I'm beginning with SOLR so please don't flame me if this question is stupid or something like this. I was reading solr documentation and found out that there is something called "highlight". I have really simple query: /select?q=text:test&wt=json&indent=true text is a field in my index and I'm trying to highlight...

Lucene vs Solr, indexning speed for sampe data


java,indexing,solr,lucene,full-text-search
I have worked upon Lucene before and now moving towards Solr. The problem is that I am not able to do Indexing on Solr as fast as Lucene can do. My Lucene Code: public class LuceneIndexer { public static void main(String[] args) { String indexDir = "/home/demo/indexes/index1/"; IndexWriterConfig indexWriterConfig =...

dse cassandra solr doesnt return _uniqueKey in response


solr,cassandra,datastax,datastax-enterprise
Im using Datastax 4.6. My solr client queries data by using _uniqueKey. From version 4.6 the limitation about using simple primary key is removed. How can i configure solr or create table in cassandra, so that I receive in solr response information about synthetic key _uniqueKey. There is no problem...

How to index documents with their metadata in a DB using Solr 5.1.0


mysql,solr
I'm using Apache Solr to index documents for a search engine. These documents are stored locally on my file system. In order to do a faceted search I also have to include these documents meta-data which is stored in a MySQL DB. Is there a way to simultaneously index these...

How to use all the cores of Solr in solrj


java,indexing,solr,lucene,solrj
I have downloaded solr 5.2.0 and have started using $solr_home/bin/solr start The Logs stated: Waiting to see Solr listening on port 8983 [/] Started Solr server on port 8983 (pid=17330). Happy searching! Then I visited http://localhost:8983/solr and created a new core using Core Admin / new Core as Core1 (...

Typo3 6.2: “Could not find a suitable type converter for ”String“ ” exeption after update


php,typo3,typo3-6.2.x
Typo3 was from a very old version updated to Typo3 6.2. The most things are working now, but I have one own written extension that give me the following error: Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1297759968: Exception while property mapping at property path "":Could not find a suitable...

Where are TYPO3 constants from constant editor stored?


typo3,constants
In Typo3 Backend -> Template -> Constants there is a constant editor. Where does TYPO3 saving the constants? Tried an fgrep -ri for an existing pattern, in case of saving to filesystem - no matches. Tried an MySQL search for an existing pattern, in case of saving to DB -...