Sunday, September 18, 2016

Oracle SQL Command - To Check Total Free Space In Database



Being non-DBA person, I always face this issue of checking the free space available in my production Database. If you are using ASM and wanted to check the same please us below command to get the required output:


SELECT df.tablespace_name TABLESPACE, df.total_space TOTAL_SPACE,
fs.free_space FREE_SPACE, df.total_space_mb TOTAL_SPACE_MB,
(df.total_space_mb - fs.free_space_mb) USED_SPACE_MB,
fs.free_space_mb FREE_SPACE_MB,
ROUND(100 * (fs.free_space / df.total_space),2) PCT_FREE
FROM (SELECT tablespace_name, SUM(bytes) TOTAL_SPACE,
      ROUND(SUM(bytes) / 1048576) TOTAL_SPACE_MB
      FROM dba_data_files
      GROUP BY tablespace_name) df,
     (SELECT tablespace_name, SUM(bytes) FREE_SPACE,
       ROUND(SUM(bytes) / 1048576) FREE_SPACE_MB
       FROM dba_free_space
       GROUP BY tablespace_name) fs
WHERE df.tablespace_name = fs.tablespace_name(+)
ORDER BY fs.tablespace_name;














Saturday, May 21, 2016

[ Solr ] Error Document is missing mandatory uniqueKey field id


In the schema.xml file, It is mentioned id as required field = true.
Also the document that we try to index in SOLR do not contain this id field and hence SOLR throws this error.


Solution

  1. Either add id to all your documents
OR
  1. Remove required = true form schema file for id field.

Hope This Helps!!!!

Sunday, May 15, 2016

[Google Search Appliance ] Migrate Autosuggestions from one production GSA Box to Another Production GSA Box


We all know that Google Search Appliance learns all the search queries that are getting executed and then it generates the Autosuggestion list.

However If you want to migrate all autosuggestions from one production box to another then there is no feature currently available to achieve this task. 

There is a feature request # 4411407 for allowing import query suggestion into GSA box.

However I wanted to achieve this by some custom means So I followed the below steps and it worked perfectly fine.

1) Export the suggestion in text file from first GSA Box.
2) Write a script to read each line from that files and execute the search query against word /phrase to new GSA Box.
3) This will create a new autosuggestion list in new GSA Box.

Hope this Helps!!!

Saturday, February 6, 2016

[Google Search Appliance] Semantic Search Support

Below features can be configured in GSA to enable Semantic Search
  1. Query Expansion
  2. Related Search
  3. KeyMatch Search
All the above features works on a predefined list/set of words. In order to implement these features we have to configure the list into GSA.

1)   Query Expansion
Query expansion enables GSA to automatically add extra terms to a user's search query, in order to return additional relevant results. 
When query expansion is enabled, the appliance can expand two types of terms:

Stem Words: Words that share the same word stem as the word given by the user. For example, if a user searches for "engineer," the appliance could add "engineers" to the query. (Fast, Faster, Fastest)

Terms of one or more space-separated words that are synonymous or closely related to the words given by the Business user.
For example, if a user searches for "FAQ," the appliance could add "frequently asked questions" to the query
For example if recruiter searches for “P1” the appliance could add “priority 1” to the query.

Query Expansion feature can be implemented by configuring the Synonym file into GSA.

Rule
Meaning
Comments
Java = Spring
Bi-Directional
Synonym
If user searches for Java, then user will get results for Java as well as Spring.
If user searches for Spring, then user will get results for Java as well as Spring.
Java > Spring, Java > Hibernate
One-Directional
Synonym
If user searches for Java, then user will get results for Java as well as for Spring and Hibernate.
However If user searches for Spring, then user will only get result for Spring and same applies for Hibernate
{Java, Spring, Hibernate]
Bi-Directional
Synonym
If user searches either of the words (Java, Spring, Hibernate), then user will get results for all the search terms.

Pros: If proper and accurate Synonym file is configured in GSA then it will enhanced the user search experience.
Cons: Improper Synonym file can result into false positive search results being returned.


2)  Related Search
Related Search feature can be used to associate alternative words or phrases with specified search terms. When a user enters the specified search term, the alternative word or phrase appears as a suggestion. The user can click on the suggested alternative to start another search.

Search Term
Related Query
P1
Priority 1
It works as the replacement of original “Search Term” with “Related Query”


3)  KeyMatch Search

For a given search term or phrase search; GSA can return a specific set of results to user.


Search Term
Type
Url of Match
Title of Match
GSA
Keyword Match
http://tinyurl.com
Search Architect for Google Search and Match Project

Password Protected Solr Admin Page

As we all know Solr Admin Page is not password protected and anyone can get into Solr Admin Page. However this article will ...