{"id":21496546,"url":"https://github.com/mlibrary/solr_analyzed_string","last_synced_at":"2025-03-17T12:16:06.083Z","repository":{"id":136548657,"uuid":"538212376","full_name":"mlibrary/solr_analyzed_string","owner":"mlibrary","description":"Create a string field using another fieldType's analysis chain","archived":false,"fork":false,"pushed_at":"2022-10-04T15:33:53.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-23T21:53:22.973Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlibrary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-09-18T19:04:25.000Z","updated_at":"2023-11-01T14:32:55.000Z","dependencies_parsed_at":"2024-04-10T14:06:46.794Z","dependency_job_id":"13c973ba-4a4b-4ae7-99be-fdc040df8cf7","html_url":"https://github.com/mlibrary/solr_analyzed_string","commit_stats":null,"previous_names":["mlibrary/solr_analyzed_string"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fsolr_analyzed_string","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fsolr_analyzed_string/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fsolr_analyzed_string/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fsolr_analyzed_string/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlibrary","download_url":"https://codeload.github.com/mlibrary/solr_analyzed_string/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244031154,"owners_count":20386534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-23T16:17:10.464Z","updated_at":"2025-03-17T12:16:06.036Z","avatar_url":"https://github.com/mlibrary.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# solr_analyzed_string -- fill a solr string based on a textField definition\n\nThere's a real advantage to doing data munging within the solr process, \nsince you're guaranteed that index- and query-time analysis will be \nidentical.\n\nUnfortunately, solr `TextField` types aren't run through the analyzer\nwhen doing range queries, and getting an exact phrase match (as opposed\nto an exact _subphrase_ match) can be difficult.\n\nThis code allows you to create a `fieldType` based on a `solr.TextField`, \nand then create a solr `string` field with the results of running the\ninput through that set of filters.\n\n## Usage\n\nFirst, put the latest release .jar somewhere your schema will find it.\n\nThen add something like this to your schema.\n\n```xml\n\u003c!-- A type defined with keywordTokenizer that does the work --\u003e\n  \u003cfieldType name=\"browse_key_analysis\" class=\"solr.TextField\" positionIncrementGap=\"10000\"\u003e\n    \u003canalyzer\u003e\n      \u003ctokenizer class=\"solr.KeywordTokenizerFactory\"/\u003e\n      \u003cfilter class=\"solr.ICUFoldingFilterFactory\"/\u003e\n      \u003cfilter class=\"solr.PatternReplaceFilterFactory\" pattern=\"^the\\s+\" replacement=\"\" replace=\"all\"/\u003e\n      \u003cfilter class=\"solr.PatternReplaceFilterFactory\" pattern=\"[:\\-]+\" replacement=\" \" replace=\"all\"/\u003e\n      \u003cfilter class=\"solr.PatternReplaceFilterFactory\" pattern=\"[\\p{P}\\p{Sm}\\p{So}]\" replacement=\"\" replace=\"all\"/\u003e\n      \u003cfilter class=\"solr.TrimFilterFactory\"/\u003e\n      \u003cfilter class=\"solr.PatternReplaceFilterFactory\" pattern=\"\\p{Z}\" replacement=\" \" replace=\"all\"/\u003e\n    \u003c/analyzer\u003e\n  \u003c/fieldType\u003e\n\n  \u003c!-- A string type that will run the analyzer associated with the given \n  fieldType --\u003e\n  \u003cfieldType name=\"browse_key\" class=\"com.billdueber.solr.schema.AnalyzedString\" fieldType=\"browse_key_analysis\"/\u003e\n\n  \u003c!-- A field that uses that type --\u003e\n  \u003cfield name=\"author_browse\" type=\"browse_key\" indexed=\"true\" stored=\"true\"/\u003e\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlibrary%2Fsolr_analyzed_string","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlibrary%2Fsolr_analyzed_string","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlibrary%2Fsolr_analyzed_string/lists"}